|
| 16 Nov 2014 03:20 PM |
| How do I get a part's CFrame'd rotation but not the position? |
|
|
| Report Abuse |
|
|
| 16 Nov 2014 03:23 PM |
| local X, Y, Z = CFrameValue:toEulerAnglesXYZ() |
|
|
| Report Abuse |
|
Xsitsu
|
  |
| Joined: 28 Jul 2009 |
| Total Posts: 2921 |
|
|
| 16 Nov 2014 03:25 PM |
local x, y, z = part.CFrame:toEulerAnglesXYZ()
This will return the best guess angles on the X, Y, and Z plane for the parts CFrame. I used it for determining rotation in increments of 90 degrees on the Y axis, but I'm not sure how accurate it will be for more sensitive measurements.
It also returns angle measurements in radians. To convert from radians to degrees you do X*180/math.pi (in case you didn't know) |
|
|
| Report Abuse |
|
|
| 16 Nov 2014 03:42 PM |
| Or just use math.deg(X) instead... |
|
|
| Report Abuse |
|