Are you one of Roblox users who also make a game in this online gaming platform? Or you may be Roblox user who are still learning to create a game for Roblox. If so, knowing about cframe angles is a must. What is it? Have you ever heard about this before? Cframe angles is a type of data which indicates a position and orientation in 3D spaces.
Certainly, you need to know that all objects that are inherited from BasePart have a property named Cframe of this type. This property specifies the position of the object and the orientation of the object as well. The position information can be seen in the Position property as well. And the Rotation information can be seen in the Rotation property.
You are able to see the constructors including Cframe.Angles in the website of wiki Roblox. For Cframe.Angles, the syntax is number rX, number rY and number rZ. The description of the syntax is that that is to make a rotated Cframe by using euler angles (rX, rY, rZ) in radians. Rotations are applied in Z, Y, X order. Then, you also need to know that Vector3 unit which is number rotation is the syntax of Cframe.fromAxisAngle. It can make a Cframe which is rotated from a Unit Vector3 and a rotation in radians. You have to know that Number rX, number rY, number rZ is the syntax for Cframe.fromEulerAnglesXYZ . It is able to make a rotated Cframeusing euler angles (rX, rY, rZ) in radians. Rotations will be applied in Z, Y, X order. Cframe.fromEulerAnglesYXZ is number rX, number rY, number rZ. It makes a rotated Cframe by using euler angles(rX, rY rZ) in radians. Rotations will be applied in Z, X, Y order.
There is a user who is curious about how to do Cframe rotation. He said that he had a bug thing when he attempted to rotate parts and then Cframe –ing the position, rotations get undone. Furthermore, he also added that whenever he attempted to Cframe-ing the position and then attempted to rotate the parts all go on top of each other. He thought that it occurred since he used Vector3 for rotations. Then, he wanted to know how to utilize Cframe to rotate something. Then, another user gave an answer that the function that he is looking for is Cframe.Angles. If he use this function, it will add the rotation of a Cframe matrices which is given.
So, how does it work? Cframe.Angles will work in radians. What is radians? Those are convenient units of degrees which are similar to an angle at the center of a circle whose arc is similar in length to the radius. It means that if we talk about rotation, we are going to work with degrees. A big standpoint for assessing the rotation of an angle will be one of the most famous numbers of all time, pi. You also have to know that pi is measured in radians and since we know pi is half a circle or half a rotation, we are able to manipulate this number to be accurate rotations. We are able to do the exact similar thing when we face Cframe.Angles.