3D math problem: world to object origin

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Phunk(logged out)

3D math problem: world to object origin

Post by Phunk(logged out) »

I can succesfully recreate an FPS cam, but when I try to create a space cam(like the one from [DX/x]=hunt3r) I get as far as him, and then I get stuck: a cam that only works in the world Z origin, When I turn 90 degrees, I have a cam that does a roll instead of pitch. I cant translate the cam origin to anything other than the world origin. How does one do this? I could not find a suitible matrix function for this, an jus adding the new rotation to the current position does not work either. Please help!
Greets, Robin
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

simple vector math:

(vector or pos3d)position += (vector)direction.normalized() * (float)speed ;
a screen cap is worth 0x100000 DWORDS
rt
Posts: 150
Joined: Sun Nov 30, 2003 6:54 am
Location: canada
Contact:

Post by rt »

Post Reply