360 degree rotation flip for object

How can I change the rotation of an object by giving it a value from 360 degrees calculation? I found a method to do this. For this, I multiply the incoming rotation value by 0.01745329252. It works, but I’m not sure if it works very well. Please your thoughts on this.

Babylon.js Playground (babylonjs.com)

Rotations are in radians, so if you prefer to use degrees you can use the conversion method:

marker.rotation.y = BABYLON.Angle.FromDegrees(180).radians();

1 Like
marker.rotation.y = BABYLON.Tools.ToRadians(75)

(or any other value in degrees)

Example - https://playground.babylonjs.com/#YAL1RN#124


@labris’ option is better :slight_smile:

1 Like

It does the same than the tools. You can also divide it by 57.295xxxx
In the end it doesn’t make a difference. The calculation will still occur so choose your method.