Jump to content
  • Advertisement
Sign in to follow this  
Mr Lung

combining rotations ... sort of

This topic is 4852 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: http://markus.orcon.net.nz/cubes2.jpg 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 http://markus.orcon.net.nz/cubes3.jpg 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!