Vector3 of angles in degrees for rotations

S0 i know 3d math and rotations are all radians and quaternions and stuff :wink:

but honestly we all just want to work with sane values that are understanable like degrees 0-360

To even prove my point your very own inspector uses a slider with this range to set the rotation.

yet you obviously know passing in a vector3 with rotations in degrees will result in broken functionality

its not a train smash or anything but given the example of the inspector and my own opinion as well, it really shows that it is obvious we all just want to work with the angles in the format we understand and then the framework can handle doing the conversions internally.

I know you have a ANgle Utility but it only handles one value at a time.

You have so many functions on Vector 3 but not this one…?

Could you consider adding “toRadians()”

then we can do :

let someRotationVectorUsingDegrees = new Vector3(90,0,314);

someNode.rotation.copyFrom(someRotationVectorUsingDegrees.toRadians() )

unless you have it and I missed it , then please give my the dunce hat as you point me in the right direction , but I did go have a look :wink:

You already have it :slight_smile:

let someRotationVectorUsingDegrees = new Vector3(90,0,314);

someNode.rotation.copyFrom(BABYLON.Tools.ToRadians(someRotationVectorUsingDegrees) )
2 Likes

haha … i had a feeling i overlooked it , hense my closing statement :wink:

many thanks, and dunce hat for me for one hour!