I encountered a few problems and went for a different solution,
but that thing still bugs me.
I'm merely getting the cameras orientation an move it to look
at the desired target.
And somehow this results in massive jittering.
So I tried to update the positions, but that didn't help.
Without any position updates the image is jittery and seems to suffer from
the "transformation update after draw"-problem.
Using updataAbsolutePosition on the camera results in a clean displayed node. But it also results in seeing a "wrong frame" for an instant, while rotating the camera.Its not the last frame, its more like rotated around 90 degres.
The other position updates have no effect.
So can somebody tell me where the mistake is ?
Is it sth. I'm missing about the camera or the target node ?
Code: Select all
f32 camera_distance = 50.f;
void update_camera()
{
//my_target_node->updateAbsolutePosition();
//my_camera->updateAbsolutePosition();
core::vector3df temp = my_camera->getTarget() - my_camera->getPosition();
temp.normalize();
my_camera->setPosition( (my_target_node->getPosition()) - temp*camera_distance );
//my_target_node->updateAbsolutePosition();
//my_camera->updateAbsolutePosition();
}