When trying to use Rotations with CFrame
, you would have to know about Radians (or rad
) to know how to rotate the object Correctly.
Radians, putting it simply, is just another Unit of Angles that is commonly found in math in places like Trigononmetry, which would play a big role in helping you understand what exactly it is when trying to measure a Circle, On the Surface it looks pretty complicated, but its not that hard to understand, and I’ll show you a Couple of things that would help you use them.
In a Full Circle, The Angle in Degrees that it will Contain will be 360, but in Radians it will be 2π
radians, But what is a Radian? A radian is an Measurement of Angle that is roughly equal to 57.3
degrees, we get this number by dividing 360
by 2π
, with the resultant being 57.2957795131
, Which when rounded up, will be equal to 57.3
If you want more Info about Radians and such, I Recommend looking into it deeper as I have a very basic understanding of it, here is one link that might help explain more on the subject.
But, When using Radians, you have to first understand π
, or pi
, which is roughly 3.141592653
, and its often just shortened to just 3.14
, In the case of rotations, its called “pi radians”, it is equal to 180
degrees, with that info you can look at this, which will shows you the Rotation in Radians and degrees, this is a very basic however.
π/4 = 45° (pi/4 radians is equal to 45 degrees (1/8 of a circle) )
π/2 = 90° (pi/2 radians is equal to 90 degrees (1/4 of a circle) )
1π = 180° (pi radians is equal to 180 degrees (half a Circle) )
1.5π = 270° (1.5pi radians is equal to 270 degrees (3/4 of a circle) )
2π = 360° (2pi radians is equal to 360 degrees (full Circle) )
There are math functions that will help convert Degree’s to Radian’s and Radian’s to Degree’s, known as math.rad
, and math.deg
, math.rad
is the Inverse of math.deg
, and math.deg
is the Inverse of math.rad
where they each undo each other, these would be their formulas:
rad = x(180/π)
deg = x(π/180)
or in code:
rad = x * (180/math.pi)
deg = x * (math.pi/180)