of     1   

sayhisam1
#141224120Wednesday, July 23, 2014 1:29 AM GMT

When I type into output print(game.Workspace.sayhisam1.Torso.CFrame.lookVector) I get something like -0.966105103, 2.82760565e-022, -0.258149564 What exactly does this number mean? Is it representing a value? Is it in radians, degrees, or neither? I am so confused..
VisualGraphics
#141224469Wednesday, July 23, 2014 1:33 AM GMT

ReveredEngineer
#141224487Wednesday, July 23, 2014 1:33 AM GMT

Alright well: Look vector is the way the "Front" is facing, all parts have a front just look in the surface tab to see which side is the front. And that would print whitch exact way, according to Vector3 your torso is looking.
sayhisam1
#141224902Wednesday, July 23, 2014 1:38 AM GMT

I don't really quite understand the concept of direction unit vector. Could someone explain this to me? Like, if my lookVector was (1,1,1), what would my player look like?
ReveredEngineer
#141225129Wednesday, July 23, 2014 1:40 AM GMT

You would have multiple "Front" surfaces (I think) Since LookVector measures in scales from 0-1 But, (LookVectorX, LookVectorY, LookVectorZ) -- Maybe Y and Z might be switched, but I think Lua put then in alpha order.
sayhisam1
#141225355Wednesday, July 23, 2014 1:42 AM GMT

I know that it measures from 0-1, but how would you be able to use this information? What "direction" is (0,0,0) lookVector representing? Would your block in question be facing up? Down?
ReveredEngineer
#141225457Wednesday, July 23, 2014 1:44 AM GMT

LookVector 0,1,0 Is facing up LookVector 0,-1,0 Is facing down
sayhisam1
#141225635Wednesday, July 23, 2014 1:45 AM GMT

Ah, thank you, that really clears up a lot. so 180* lookVector would get you the lookVector in degrees? Assuming that 0 is facing straight forwards, and -180 is down, and 180 is up.
ReveredEngineer
#141226067Wednesday, July 23, 2014 1:50 AM GMT

Yes, but that would scale 180 down to the 0-1 scale for you; So it would work.
sayhisam1
#141226178Wednesday, July 23, 2014 1:51 AM GMT

so then if you were to turn a part upside down, so that it would be facing behind where it was, but upside down, what would the lookVector be then?
ReveredEngineer
#141226436Wednesday, July 23, 2014 1:53 AM GMT

Just it's negative counterpart. part = script.Parent function reverse() wait(1) part.LookVector = (0, 1, 0) wait(1) part.LookVector = (0, -1, 0) end This function just reverses it's LookVector over the Y axis.
sayhisam1
#141226887Wednesday, July 23, 2014 1:58 AM GMT

Pretty sure lookVector is read-only. And is located in CFrame of a part... On a side note, what is the rotation of a part, then? Can you convert between lookVector and rotation?
ReveredEngineer
#141227073Wednesday, July 23, 2014 2:00 AM GMT

It's not read only, you can do stuff like Part.Position = NewPart.CFrame.LookVector * CFrame.new(2, 0, 0)
Notunknown99
#141230967Wednesday, July 23, 2014 2:40 AM GMT

The "lookVector" is the "forward vector" of the 3 vectors that make up the rotation part of the CFrame. (Well, actually it is the negative back vector, but yeah) Here is how the rotation part of a CFrame works: UpX, RightX, BackX UpY, RightY, BackY UpZ, RightZ, BackZ Where Up, Right and Back are 3 perpendicular unit vectors which represent the 3 facing directions of the matrix.
sayhisam1
#141286326Wednesday, July 23, 2014 5:08 PM GMT

Ah, so the rotation part of the CFrame are the quaternions, right?

    of     1