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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...