setPosition of Entity

kurt100

26-06-2006 16:18:26

I would like to reset my car in special situations to a certain point. If I use setPosition(), it will jump to the point for a very short time and after that you are on your position again.
I don't know what to do. If i freeze the Body of the entity, it works (car jumps to destination point), but I can't use the car after that. If I unfreeze the body, the car jumps back to his old position.
I would be nice if somebody could help me...

abecam

26-06-2006 18:21:16

In the example SimpleVehicle, Walaber destruct and recreate the vehicle. I do so in my game... It works well this way. Does it help?

Buckcherry

27-06-2006 10:58:16

Do you use the following line?
mEntity->setPosition(Vector3(0,0,0));

Because, if so, you should use:
mBody->setPositionOrientation(Vector3(0,0,0), Quaternion::IDENTITY);

You have to move the bodies rather than the entities nor scenenodes...