Snippet3D ObjectObject Continuous Rotation

Continuously Rotating Object


object-rotation_result

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;
}
Last updated on