Archived

This topic is now archived and is closed to further replies.

dave

Achieving the desired rotating effect?

Recommended Posts

hi all, Another post from me I have loaded an XFile object which i created using Truespace 3D. I wish to rotate it around its own y axis, ie on the spot, but cant figure out how. I''m sure the solution is to do with rotating the object around any specific axis. The only rotation i have achieved so far is rotating it around the global (0,1,0). Thanx ace

Share this post


Link to post
Share on other sites
Do you want to rotate it in Truespace, save the rotation as an animation, and load the animation from the x file?

Or do you mean that you''d like to rotate the object in Direct3D with code?

If it is the latter, you need to export the model in the center of the universe. Load it in DirectX, rotate it about the Y axis, then set your transform so that it translates to the world position you want it at. You would multiply your matrices as such: FinalPos = YRotMat*TransMat; If you reverse the multiplication, you could see what you''re getting.

Good luck,
Chris

Share this post


Link to post
Share on other sites