strange setUpVector problem.

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
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

strange setUpVector problem.

Post by Malgodur »

Im trying to change the upvector of fps camera scene node. But it dont work properly, please help, ill try to describe the problem:

(0,1,0) its default value and work properly

(0,-1,0) works allright but both mouse axis seem to be inverted

(1,0,0) , (0,0,1), etc act NUTS, camera view turn really strange when i move mouse, and its completly uncontrollable for common player.

do anyone know what cause this? Its the problem of camera itself or of its controls? (ps, Im trying to change the gravity ingame so change of upvector of camera is necessary)
Brainsaw
Posts: 1259
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I can't say for sure but I think the FPS camera does not use the up-vector to convert the mouse input. I think you'll have to either adapt the FPS camera or write your own.
Image
Dustbin::Games on the web: https://www.dustbin-online.de/
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The up vector should always point out of the "head" of the camera, depending on its rotation. It does not have anything to do with gravity or the like. If you rotate the camera 180 degrees about the z axis (turning it head over) you should make the up vector (0,-1,0). Then the inversion is also correct, as you're flipped head over.
Post Reply