I haven't quite warmed up to the ogre api yet, so please bear with me...
I need to know how to set a fixed yaw axis for a particular sceneNode. When my plane is rotated (looks like it is turning), the local y axis of the node is then also used for yaw. I would like to set a fixed yaw axis for this particular node so that when the plane is rotated it can also turn in the correct fashion.
this is my current yaw code from one of the tutorials that uses a local axis from which to yaw:
mControlNode->yaw(Radian (Degree( mfYaw * evt.timeSinceLastFrame )));
Plane yaw problems
-
- Halfling
- Posts: 72
- Joined: Thu Mar 03, 2005 9:52 pm
ok, I got that working now (thanks to your replies), but now ive run into another problem:
I want the ground to tilt the opposite direction that the plane is turning... so i do this (see below) with the plane and the camera and it works pretty well. The only problem is that it gets kind of "glitchy" but the framerates are still >100 all the time. Maybe im implementing this incorrectly?
I want the ground to tilt the opposite direction that the plane is turning... so i do this (see below) with the plane and the camera and it works pretty well. The only problem is that it gets kind of "glitchy" but the framerates are still >100 all the time. Maybe im implementing this incorrectly?
Code: Select all
Quaternion qRoll, qPitch;
qRoll.FromAngleAxis(Radian (Degree (mfShipRoll)), Vector3::UNIT_Z);
qPitch.FromAngleAxis(Radian (Degree (mfShipPitch)), Vector3::UNIT_X);
mShipNode->setOrientation( qRoll * qPitch );
mCameraNode->setOrientation( -qRoll );