Jump to content

  • Log In with Google      Sign In   
  • Create Account


Mapping user input to object rotation without order/gimbol prob


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Nalis   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 July 2001 - 10:19 PM

I know this has been addressed before but the past posts seem to be geared toward cameras. So here is exactly what I would like to do and the problem I am having. Any help would be GREATLY appreciated. I am attempting to apply user control to a spaceship. I am having the well discussed problem of gimbol lock. I want a user to be able to rotate the ship using pitch, roll, and yaw. When the user pitches up, the rotation needs to be in relation to the ship. I understand the problem of rotation order. I have tried to use Quaternions but of course when I convert from pitch, roll, yaw to the quat, I get the same effects. How do you map user input to a Quaternion? Or, how do I map the current pitch, roll, and yaw of the ship to the model in a way that allows each axis to relate to it''s peer on the model, effectivly applying xyz rotation simultainiously from an origin. It is important to my applicaiton to know the exact rotation of the model at all times so simply appying rotations continuosly to a matrix doesn''t work well for that. I hope you understand what I am asking. I need to map that user input to the object. Thanks

Sponsor:

#2 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 24 July 2001 - 02:56 AM

Well, I might be wrong, but the problem of the gimbal lock is that an object is rotated, but not it''s coordinate frame, so a rotated axis could map onto another axis of the static coordinate system ?
The solution would be to rotate the local coordinate system of the object.
What about maintaining 3 quaternions representing the 3 axes of rotation (x,y,z) of the object. Now, if you want to rotate around, say x, don''t rotate about the actual x-axis, but around the axis represented by the x-quaternion. Update your model with the rotation, aswell as the other two quats. This should avoid the gimbal lock ? And there is surely a simpler solution to this problem





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS