Skip to main content
gamedev.net
🔒 Locked

Problems with rotations...

Started by nickf Aug 4, 2006 at 3:37 PM 1 replies 500+ views
Original Post
nickf
nickf
Hi guys, I'm new to DirectX and I'm guessing this is a pretty common problem, but I haven't had much luck searching for a solution. I've been trying to setup a "Node" class that sets up the world matrix (with translation, scaling and rotation) before rendering an attached object but I'm having trouble with the rotations, as you can't just rotate about the XYZ axes. I've tried a few approaches, rotated about different axes, but I've none have worked properly. Could someone outline the general procedure for setting up a transformation matrix from 3 rotation parameters? Thanks
deathkrush
deathkrush
What do you mean by "none have worked properly"? Did the object not rotate? Did it experience a gimbal lock? Did it rotate in random direction?

For Euler rotations, DirectX has D3DXMatrixRotationYawPitchRoll function which rotates about XYZ axes.
deathkrushPS3/Xbox360 Graphics Programmer, Mass Media.Completed Projects: Stuntman Ignition (PS3), Saints Row 2 (PS3), Darksiders(PS3, 360)
nickf
nickf
When I say they didn't work properly I think they were just being rotated about the wrong axes, although D3DXMatrixRotationYawPitchRoll looks like just the thing I need - can't beleive I didn't spot that one myself.

Thanks a lot for the help

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.