Skip to main content
gamedev.net
🔒 Locked

Rotating object

Started by Getty Mar 15, 2003 at 2:56 PM 2 replies 950+ views
Original Post
Getty
Getty
How do I go about rotating an object in world space to match my camera axis? What I'm doing is firing a rocket down my camera's look axis. That part I've been able to do. The problem is, my rocket models orientation doesn't match the direction that I'm firing. [edited by - Getty on March 15, 2003 4:02:26 PM]
Pipo DeClown
Pipo DeClown
Billboarding? I mean something in the same direction as billboarding, but ofcourse with the 3D object.

.lick
3dModelMan
3dModelMan
Use the inverse view matrix as your rockets initial matrix then move the rocket along it''s Z axis with respect to time;

matRocket._41 += matRocket._31 * fTime * fSpeed;
matRocket._42 += matRocket._32 * fTime * fSpeed;
matRocket._43 += matRocket._33 * fTime * fSpeed;
Getty
Getty

Thanks for pointing me in the right direction. I used techniqe very similar to billboarding to get it to work.

Topic Locked

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

Sign in to reply to this topic.