Incorrect CFrame.Angles orientation

Hello everyone, I am currently working with Motor6Ds and it’s position and orientation.

Oddly, the orientation of the Motor6D’s C1 differs from what it is supposed to do in the code.

Below is the code and a screenshot of what the orientation looks like:

Motor6D.C1 = CFrame.new(1.457, -1.266, 0) * CFrame.Angles(math.rad(40), math.rad(90), math.rad(0))

image

I am trying to make the orientation (40, 90, 0), but unfortunately there is no luck. There is definitely something I am doing wrong.

Responses of any sort are heavily appreciated.

I think it’s gimbal lock. When you rotate a CFrame by 90 degrees you now align it with one of the other 2 axes, locking it there and messing up the numbers.
There are posts that deal with how to solve this. Try the Search button up top.

I understand. Thank you for your response and I will search accordingly.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.