|
| 08 Feb 2012 04:29 PM |
| How would I go about rotating a part on the world's x axis as opposed to rotating a part on it's own x axis? |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 04:39 PM |
I have no idea if this works, I just guessed... It probably won't work, but I'm sure it's something like this.
local Part = Workspace.Part local CurrentAngle = CFrame.fromEulerAnglesXYZ( Part.CFrame:toEulerAnglesXYZ() ) local Rotation = CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0) Part.CFrame = CurrentAngle * Rotation * Part.Position
▌†ηϨ▐ |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 06:04 PM |
| Kind of looks like a bunch of made up stuff. All legitimate methods, but I've tried random stuff like this and the part just rotates weirdly. Anyone else have some experience with rotations and what not? |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 08 Feb 2012 06:11 PM |
local part=workspace.Part; Part.CFrame=CFrame.Angles(math.rad(90),0,0)*Part.CFrame; |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 06:15 PM |
| Is that going to rotate the part on the world's x axis? Because when I did that it didn't. |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 08 Feb 2012 06:18 PM |
| If you mean rotate it around the X-axis as in like spin it around then yes, that should work. Otherwise I don't understand what you're saying. |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 06:23 PM |
| If you have a part tilted 45 degrees on the y axis, and then rotated the part 45 degrees on the x axis, it would be rotated differently than if you rotated it on the world's x axis. |
|
|
| Report Abuse |
|
|