of     1   

islandmaker2012
#140354196Tuesday, July 15, 2014 12:00 AM GMT

how do I get the rotation of a CFrame..?
Distortional
#140354426Tuesday, July 15, 2014 12:02 AM GMT

...... Caaaactus.
islandmaker2012
#140354720Tuesday, July 15, 2014 12:05 AM GMT

^ y u not answering for real :|?
Ulrakid11
#140354840Tuesday, July 15, 2014 12:06 AM GMT

One way would be to return or print workspace.Part.CFrame or whatever it's called. The last 9 digits are the rotation matrix.
islandmaker2012
#140354964Tuesday, July 15, 2014 12:07 AM GMT

^ ik that, but how to extract the last digits? like, get 3 numbers for the rotation?? like CFrame.Angles(num,num,num)? from Workspace.Part.CFrame
islandmaker2012
#140355382Tuesday, July 15, 2014 12:12 AM GMT

BUMPP
LegendaryAccount
#140356838Tuesday, July 15, 2014 12:27 AM GMT

print(Workspace.Partname.Rotation)
islandmaker2012
#140358417Tuesday, July 15, 2014 12:43 AM GMT

^ no, not .Rotation, i want CFrame.Angles(x,y,z)
islandmaker2012
#140361074Tuesday, July 15, 2014 1:09 AM GMT

bg = script.Parent t = bg.Parent while wait() do local x,y,z = t.X.Value,t.Y.Value,t.Z.Value bg.cframe = CFrame.Angles(x,y,z) end Workspace.ChildAdded:connect(function(c) if c.Name == "Rocket " then cf = CFrame.new(script.Parent.Position,c.Position) wait() --so this is where I need to get the CFrame.Angles from cf, and get the .X .Y and .Z of it, so that t.X.Value = .X of it, etc end end)
islandmaker2012
#140362169Tuesday, July 15, 2014 1:21 AM GMT

function CFrameAngles(CFrame) Matrix1, Matrix2, Matrix3, Matrix4, Matrix5, Matrix6, Matrix7, Matrix8, Matrix9, Matrix10, Matrix11, Matrix12, = select(3, Workspace.BasePlate.CFrame:components()) X,Y,Z = --Calculation to turn Matrix stuff into X,Y,Z help??? return CFrame.Angles(X,Y,Z) end
warspyking
#140362603Tuesday, July 15, 2014 1:25 AM GMT

@island I meant a new post, asking for a rotation matrix to x,y,z axis converter Plus you forgot to give me credit...
islandmaker2012
#140362734Tuesday, July 15, 2014 1:26 AM GMT

@war sorry, I guess? I'm still trying to figure this out..
warspyking
#140363013Tuesday, July 15, 2014 1:29 AM GMT

How exactly do you turn the matrix to axis? R00 R01 R02 R10 R11 R12 R20 R21 R22 Now, R00, R10, R20 make up X, R01, R11, R21 make up y, and R02, R12, R22 make up Z But HOW do you convert them?
warspyking
#140400539Tuesday, July 15, 2014 10:33 AM GMT

I failed on that function I gave you, there's only 9 matrix values not 12. (oops) Anyway, I did some more research and I think I got your function; function CFrameAngles(CFrame) local Matrix00, Matrix01, Matrix02, Matrix10, Matrix11, Matrix12, Matrix20, Matrix21, Matrix22 = select(3, Workspace.BasePlate.CFrame:components()) local X,Y,Z = math.atan2(-Matrix12, Matrix22), math.asin(Matrix02), math.atan2(-Matrix01, Matrix00) return CFrame.Angles(X,Y,Z) end So um, who needs ToEulerAnglesXYZ ???
LunaticHakuzu
#140400678Tuesday, July 15, 2014 10:38 AM GMT

toEulerAnglesXYZ is just longer than Angles. We used to only have toEulerAnglesXYZ. It's more preferrable that you use Angles.
Bebee2
#140400846Tuesday, July 15, 2014 10:43 AM GMT

Fun fact - The last row of ROBLOX's matrix is equivalent to the negative lookVector. Calculating X and Y angle from a unit vector is valid using almost the same equation.
warspyking
#140401126Tuesday, July 15, 2014 10:52 AM GMT

@drag ToEulerAnglesXYZ is a method Angles is a constructor @be I did not know that. That could come in handy.

    of     1