Dude759
|
  |
| Joined: 27 Feb 2010 |
| Total Posts: 163 |
|
|
| 02 Jun 2012 10:57 AM |
Hello, I want to rotate an object realtive to the y axis, the y axis in the world, meaning the axis will always point up and down, perfectly strait, but roblox uses Eulers Angles meaning the y axis is relitive so it can point in any direction. So how do I rotate an object regardless of where the other angles are on the Y axis, avoiding Eulers Angles? please use cframe and angle as the variables cframe = cframe * ? |
|
|
| Report Abuse |
|
|
rp069
|
  |
| Joined: 22 Apr 2011 |
| Total Posts: 6206 |
|
|
| 02 Jun 2012 11:00 AM |
| use a body rotational velocity, unless it has no room to rotate, in which case jsut use a free script |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 02 Jun 2012 11:01 AM |
Simply just flip the order in which you multiply it. With CFrame's, the one you multiply second is offset by the one you multiplied first so
cframe=CFrame.Angles(0,1,0)*part.CFrame; |
|
|
| Report Abuse |
|
|
Dude759
|
  |
| Joined: 27 Feb 2010 |
| Total Posts: 163 |
|
|
| 02 Jun 2012 11:04 AM |
| That's the problem, that only rotates the object in the relative Euler rotation axis, I want it to rotate on the World Y axis pointing up, like lets say an object is sideways, well then the Euler axis would rotate sideways, but I want my object to rotate on the up and down axis, regardless of it being sideways or not |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 02 Jun 2012 11:06 AM |
| And that's why I just gave you the solution... Like I said, multiplying matrices is different from multiplying numbers, it matters what order you put them in. |
|
|
| Report Abuse |
|
|
Dude759
|
  |
| Joined: 27 Feb 2010 |
| Total Posts: 163 |
|
|
| 02 Jun 2012 11:12 AM |
| Sweet, thanks alot, sorry I didn't read XD |
|
|
| Report Abuse |
|
|