Hi here
i feel like a noob again with my rotation misunderstanding
i try to rotate a box using Quaternion.RotationAxis and the rotation result look’s wrong.
https://playground.babylonjs.com/ts.html#4KDYJD
need some help, svp.
thx.
Hi here
i feel like a noob again with my rotation misunderstanding
i try to rotate a box using Quaternion.RotationAxis and the rotation result look’s wrong.
https://playground.babylonjs.com/ts.html#4KDYJD
need some help, svp.
thx.
It looks like you want to rotate by degrees. BJS uses radians.
Hey lluull
Just like adam said, you’ll need to use radians. You should just be able to throw in a conversion to radians like angleRad = angle / 180 * Math.PI (if you use a new var for the radians, don’t forget to change the var used in the quaternion function call) and that should fix things up for you.
We provide tools for that:
BABYLON.Tools.ToDegrees()
and
BABYLON.Tools.ToRadians()
hehehehe sure i was very noob on this one
thank you adam for pointing me that Babylon use radian
thank you PolygonalSun for the additional info and the formula
thank you DeltaKosh to inform about the built-in tool
thx all of you guy’s