Jump to content
The Dark Mod Forums

free rotation for entities without a model


Recommended Posts

I have a problem. I still work on an entity definition file for XreaL.

 

I would like to use the rotation tool to have abitrary rotations for the following entity:

 

 entityDef info_player_intermission
{	
 "editor_color"				"1 0 1"	 
 "editor_mins"				"-16 -16 -16"
 "editor_maxs"				"16 16 16"
 "editor_rotatable"			"1"

 "editor_usage"				"Camera for intermission screen between matches. This also automatically generates the podium for bot arena matches (see Notes). Can be aimed by setting the 'angles' key or targeting an pointing to an aiming entity. Use only one per level."

 "spawnclass"				"idPlayerStart"

 "editor_var angles"			"alternate 'pitch, yaw, roll' angles method of aiming intermission camera (default 0 0 0)."
 "editor_var target"			"point this to an info_notnull or target_position entity to set the camera's pointing angles."

 "angles"					"0 0 0"
 "target"					""
}

 

 

However I cannot get it to work. It looks like "angles" as keyword are not support by DarkRadiant at all.

I just want DarkRadiant to set the "rotation" keywork and to show me the direction of the forward vector but it only sets a yaw "angle" keyword all the time.

 

Any suggestions?

Link to comment
Share on other sites

I have a problem. I still work on an entity definition file for XreaL.

 

I would like to use the rotation tool to have abitrary rotations for the following entity:

 

However I cannot get it to work. It looks like "angles" as keyword are not support by DarkRadiant at all.

I just want DarkRadiant to set the "rotation" keywork and to show me the direction of the forward vector but it only sets a yaw "angle" keyword all the time.

 

Any suggestions?

DarkRadiant creates a so-called "GenericEntity" for this type of entityDef. This is the same type as path_corner and info_player_start are using when placeed in the map.

 

Unfortunately, this type doesn't support free-rotation, but I guess this can be implemented. The editor_rotatable spawnarg is currently disregarded by the editor - this keyvalue should be checked when the GenericEntity is created and an internal flag should indicate that this entity allows free rotation. This feature is not yet implemented so to say - it should be fixed, I guess.

 

The offending point in the code is here, compare the files plugins/entity/generic/GenericEntityNode.cpp and GenericEntity.cpp:

void GenericEntity::rotate(const Quaternion& rotation) {
m_angle = angle_rotated(m_angle, rotation);
}

This is where the quaternion is just converted into a yaw value.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...