Rotation of object

Hello, is there a way to smooth rotate an object similar to translate for movement? Thanks.

Hi @ayrin,

The corresponding method for adding a rotation, similar to entity.translate() is:

myEntity.rotate(45, 0, 0);

For smooth rotations you can use the Playcanvas tween library:

https://developer.playcanvas.com/en/tutorials/tweening/

1 Like