i want to teleport an fps camera. Since it's a node with an attached ISceneNodeAnimatorCollisionResponse, i have to call setTargetNode() afterwards in order for the teleportation to work.
Code: Select all
camera->setPosition(somePosition);
camera->setTarget(someTarget);
anim->setTargetNode(camera);
In my opinion the ISceneNodeAnimatorCollisionResponse should keep track of the last rotation of a node (or target if it's a camera), like it does for the last position with the member LastPosition, so you can set a custom target when 'teleporting' a camera.
Removing the old animator, teleport the node and attach a clone is a bit ugly.
What do you think?
Edit: As a workaround you can use camera->updateAbsolutePosition(); after camera->setPosition(). Didn't think of that.
