Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » linking presets  () 1 Vote
Re: linking presets [message #486054 is a reply to message #486053] Thu, 13 February 2014 13:53 Go to previous messageGo to previous message
Neijwiert is currently offline  Neijwiert
Messages: 124
Registered: October 2009
Karma:
Recruit
You mean like relative cordinates? You need to store the relative cordinates somewhere like: ChildObjPosition - ParentObjPosition and ChildObjRotation - ParentObjRotation. The child needs to be positioned when the parent is rotated with 0 degrees. Then whenever you move around/rotate the parent you need to recalculate the child position(s). The algorithms for this can be found on the internet.
Does not need to be related to c++, these problems occur at multiple places.

EDIT: with parent 0 rotation i mean like the default rotation of the thing...

EDIT #2: You can get the full translations of objects with Get_Transform, this returns a Matrix3D object which contains position and rotation. And you can apply that with Set_Transform

[Updated on: Thu, 13 February 2014 13:55]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Sidebar tutorial for Renegade modders
Next Topic: butterfingers crate
Goto Forum:
  


Current Time: Thu Dec 19 11:51:05 MST 2024

Total time taken to generate the page: 0.00747 seconds