You can implement it simply using the following methods.
This method modifies the rotation value directly.
const SPEED = 5;const obj = WORLD.getObject('obj');function Update(dt) { obj.rotation.y += dt * SPEED; // If the object's Physics Body property is enabled, run the following code. // obj.body.needUpdate = true;}
This method uses the rotate function.
const SPEED = 5;const obj = WORLD.getObject('obj');function Update(dt) { obj.rotate(0, SPEED, 0); // If the object's Physics Body property is enabled, run the following code. // obj.body.needUpdate = true;}