Advertisement Jump to content
Sign in to follow this  
Mr Lung

combining rotations ... sort of

This topic is 4915 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all, another question for the 3d maths genii... Situation: -I have objects, that are joined by "connection points" -Each connection point is described by an offset from the center of the object, and a vector for the direction of the connection -connected objects have a single "rotation" value, that describes how far the connected object is rotated about the connection Now, when I attach many objects together first, I can apply "rotations about the connection" to any connection, and propagate this back along any connected items, and this works fine. However, if I attach a new object to other objects that are already connected, and already have rotations about their respective connection points, I need the newly connected piece to somehow inherit these parent rotations... however, as each connection point is in an arbiratry direction and at an arbitrary angle.. i'm lost as to the best method to achieve this. to describe my issue visually, see: in each picture, the bottom cube is the base block, and has no rotation applied to it. in figure 1, two child blocks are attached via connection points. in figure 2, the middle block has then been rotated 45 degrees, counter clockwise, and the rotation has propagated to the top most block (correct scenario) however, in figure 3, what I did was, attach the third block (top most) block AFTER applying the 45 degrees rotation to the middle block (the second block attached). note the difference (see for a top down view) now, one way to achieve consistent results would be, to "unwind" all the parent connection point rotations, attached the new object, then re-apply each parent rotation, but that seems awfully tedious... is there another way to achieve this? Thanks in advance Markus

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!