[feature request] ISceneNodeAnimatorCollisionResponse

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

[feature request] ISceneNodeAnimatorCollisionResponse

Post by randomMesh »

Hi,

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);
This works fine for the position, but unfortunately setTargetNode() doesn't update the internal state of the animator for the camera's target.

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. :roll:
"Whoops..."
Post Reply