Camera SetPosition and SetTarget Don't Seem to Work

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
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Camera SetPosition and SetTarget Don't Seem to Work

Post by soconne »

I'm having a problem getting SetPosition and SetTarget to work correctly with the CCameraFPSSceneNode camera.

I have a grid of points that start at 0,0,0 and end at 100,0,100, being evenly spaced out. I then call

camera->setPosition(0,10,0);
camera->setTarget(50,0,50);

Now this 'should' point the camera directly to the center of the grid, but instead I'm facing the opposite direction. I have to use the mouse to turn around. Sometimes, even the y values are messed up and I have to look up or down to get the grid into view.

Its not my grid points, I've already checked that. Anybody have any similiar problems?
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

Post by schick »

Maybe, have look at code the camera scenenode in the irrlicht source. I had the same problem. I think, dunno far away in the past, that the camera scenenode updates relativly to its current target, so it may mess up.

I wrote a stand alone camera you may want to use it. The code is posted somewhere here in the forums.
Please send me an e-mail instead of a private message.
Post Reply