• 12
• 10
• 10
• 13
• 10

Transforming linear/rot. vel. in accordance to a surface?

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

Recommended Posts

I had a previous post like this, for positions... (here, there're some details that still apply here) Now, I can't get something to work for linear and rotation velocity. I have an object, O, which is moving at a velocity of V (in world space). Now, I want to take V, and transform it so that it's relative to an object, B, by its rotation and position, the way it's relative to another object, A, by its rotation and position. How do I do this? Also, for O, I have a rotation velocity. How do I do the above, but for the rotation velocity? (Which is relative to O itself, not in world space...) Thanks a bunch! [smile] My rotations are represented via quaternions and my positions via 3D vectors... I can convert back and forth to matrices if needed, though. (I've tried doing the same thing as in my other post for positions, but it had VERY strange results... I'm guessing it's just not the same, since velocity is a direction and magnitude [all together in a 3D vector], not just a position) [Edited by - agi_shi on November 4, 2007 9:34:50 AM]

Share on other sites
VA -= VB + VO where VB -= VO.

As far as relative rotation, you might not need to want to. Even so, what axis of rotation do you want for A? Does it rotate around B? O? Origin?

Share on other sites
Quote:
 Original post by erissianVA -= VB + VO where VB -= VO.As far as relative rotation, you might not need to want to. Even so, what axis of rotation do you want for A? Does it rotate around B? O? Origin?

Hm. Thanks for the reply! However - from what I understand, that won't take the orientations of the objects into account... (I realize my OP was a bit unclear, I fixed it)

Share on other sites
What won't take orientation into account? The velocity defines only the direction the object is moving, and how quickly. Did you mean the rotations? We haven't got to those yet.

Share on other sites
Quote:
 Original post by erissianWhat won't take orientation into account? The velocity defines only the direction the object is moving, and how quickly. Did you mean the rotations? We haven't got to those yet.

I know. What I'm saying, is that I want to take V, and make it relative to B, the way it is relative to A (by their orientation/position, not how it's relative to their velocities).

That's a 2D representation of what I want... Basically, V is going somewhere, I then take it's relativity to A, and make it relative to B the same way, resulting in V'.

I'm not quite sure how to explain it better... thanks for your replies so far, though [smile]

Share on other sites
Ok, let's do it this way: You're trying to get help with a method to do something. Why don't you tell me what that something is? That way I won't have to guess what you mean.

Share on other sites
Quote:
 Original post by erissianOk, let's do it this way: You're trying to get help with a method to do something. Why don't you tell me what that something is? That way I won't have to guess what you mean.

Quote:
 I want to take V, and make it relative to B, the way it is relative to A (by their orientation/position, not how it's relative to their velocities)

Not sure how much better I can explain it. Does the picture not help a bit? The little arrows on the surfaces show the way the surface is facing.

Look at my other post here, there's the solution to transforming a position. Now I need to do the same, but for a linear velocity (possibly rotational velocity).

Share on other sites
Yes, I made it work with the previous method!

- translation of matrix = [0]- rotation of matrix = [something perpendicular, something perpendicular, normalised velocity]- transform the matrix as previously- new velocity = z axis of transformed matrix orientation * old magnitude

Crude, but it works. If you guys have more optimized ways [grin], I wouldn't mind [smile]