Sign in to follow this  
Adaline

angular speed implementation

Recommended Posts

Hello, Let say we have a cube with (pi/4,pi/4,pi/4) as orientation vector. Now, (due to some collision, for instance), I have to apply a y-axis rotation speed, so that the cube should be rotating along y axis. This angular vector , according to angular speed vector and elapsed time has the form (0,lambda,0) The problem is if I add orientation and angular vectors, I have (pi/4,pi/4+lambda,pi/4). So the cube isn't rotating along Y axis, but along transformed Y axis according to the first applied rotation(s). ( In my case, X axis rotation). Should I keep an additional parameter per object, let's say angle, and apply 2 series of rotations (one for orientation, one for angles) for computing world matrix ? Or, am I totally wrong and should I simply add angular vector with orientation ? If so, could you explain what's wrong in the explained idea? Thank you !

Share this post


Link to post
Share on other sites
Quote:
Let say we have a cube with (pi/4,pi/4,pi/4) as orientation vector.
What do you mean, "orientation vector"? Are you trying to maintain the cube's orientation as a set of Euler angles? That's a tedious thing to do, and probably confers no benefits.

Maintain orientation as a quaternion or as a matrix. Applying a rotation is simply a matter of multiplication.

Share this post


Link to post
Share on other sites
In other words, you're applying the three angles separately, as successive axial rotations. That's Euler angles. (Or, to be more pedantic, Tait-Bryan angles.) It's a representation of orientation that's easy to understand, but it doesn't work well for actually maintaining combined rotations.

Share this post


Link to post
Share on other sites
That is the opposite of what I said to do. Euler angles aren't the right representation here; check out more suitable representations. This has a fair amount of useful information.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this