[SOLVED] How to rotate an entity endless?

I’m trying to endlessly rotate an object based on dt. The tween library cant do it easily and I can find any code snippets (only how to set a fixed rotation).

It seems this is a pretty common task so does anyone know the simplest way to do it?

Hi @Grimmy!

I think you can do something like below in the update function of the script. Here is 1 the rotation speed. (Not sure if you need to use rotate or rotateLocal).

// update
this.entity.rotate(0, 1 * dt, 0);
2 Likes

Thank You!