Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do CFrame.Angles coordinates work?

Asked by 8 years ago

So how do I get the exact coordinates for CFrame.Angles to script animations. In other words is there a better way to perhaps figure the coordinates out rather then just 'messing around' with the coordinates and that...

1 answer

Log in to vote
1
Answered by
BlackJPI 2658 Snack Break Moderation Voter Community Moderator
8 years ago

CFrame.Angles is a function that takes three arguments, the rotation in radians for each of the three axes. What it does is take the arguments and transforms it into a rotation matrix that can be used for adding rotation to CFrames.

So say you write CFrame.Angles(math.rad(45), 0, 0). This would return a rotation matrix equivilant to a 45 degree rotation in the x-axis, and 0 degree rotations in both the y and z axes.

0
Everytime I use CFrame.Angles on a shoulder of the Character the Arm gets teleported to the center of the Torso is there anyway to make it so that it animates from it's original position rather then going to the center of the Torso perhaps something else I can use? KingLoneCat 2642 — 8y
0
You need to keep the position of the CFrame too, a la Shoulder.C0 = CFrame.new(Shoulder.C0.p) * CFrame.Angles(rx, ry, rz) BlackJPI 2658 — 8y
0
Thanks. KingLoneCat 2642 — 8y
0
What about the :lerp? KingLoneCat 2642 — 8y
0
What aboud it? BlackJPI 2658 — 8y
Ad

Answer this question