[SOLVED] Recommend use teleport or setPosition

Both teleport and setPosition can change the entity position.

And I found that it has something wrong when I use the setPosition if the entity which rigidbody is dynamic

So,if the entity is dynamic we should use teleport?

And I want to know the performance between this two guys.

Also I want to know if the entity is static which method is recommended by official?

Thank you for your time.

When the entity has a rigid body you should use teleport to move it :slight_smile:

Unless of course you are using forces in which case the physics will move the entity.

@vaios can you elaborate on that a little more?

There is more info on the subject here https://developer.playcanvas.com/en/user-manual/physics/