Because I know there is cameraFPS node available, but just to try things out.
So suppose I've written code that caluculates a position vector and a rotation vector.
How would I set these for the IcameraSceneNode?
This is how I did it:
Code: Select all
check_keyboard_input(delta);
check_mouse_input(delta);
core::vector3df v = camera->getPosition(); v += dvector; // dvector is difference with previous position
camera->setPosition(v);
camera->setRotation((*rotation)*180/core::PI); // rotation is in radials, so needs convert to degrees
v += ((*rotation)* 180)/core::PI;
camera->setTarget(v); // target point is a random point in the direction of the rotation
Thanks