|
| 28 Nov 2015 10:09 PM |
I know what it can do, and I know it's a "the facing direction (unit vector)"
But what what do the actual coordinates it returns correlate to? Just looking for a detailed explanation :) |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2015 10:13 PM |
the direction of the coordinateframe
PERFECT BISQUE |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2015 10:14 PM |
| So by direction is it the rotation? |
|
|
| Report Abuse |
|
|
jjjakey
|
  |
| Joined: 15 Sep 2008 |
| Total Posts: 13014 |
|
|
| 28 Nov 2015 11:08 PM |
It's not a rotation. In the coordinate frame the lookVector is the second point of a vector that makes a line representing the direction a part is facing. A unit vector is a vector which has been reduced down to a length of 1.
So, imagine the center of a part as the first dot, the second is the look vector. Making a line from dot 1 and moving it through dot 2 you get a vector in the direction of the front face. |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Nov 2015 11:25 PM |
lookVector returns the Angle of the CoordinateFrame;
Also known as the second thing returned in; CFrame.new()
CFrame.new(part.CFrame.p, ANGLE/'part.CFrame.lookVector) |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2015 11:30 PM |
| It is the way the part is facing from the FrontSurface. (I know this isn't exactly accurate (cntkillme is gonna kill me), but this is a easy way to explain it). Also, pretty sure its a Vector3 format. |
|
|
| Report Abuse |
|
|
jjjakey
|
  |
| Joined: 15 Sep 2008 |
| Total Posts: 13014 |
|
|
| 28 Nov 2015 11:33 PM |
| @lilmac While those values are numerically identical on initialization, lookVector does not return the argument itself. The second argument in creating a new CFrame can be a second point which is used to create a lookvector other than 0,0,-1 (aka default forward). LookVector is calculated separately as it changes with rotation. |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2015 11:35 PM |
Thats what I meant.
Sorry if I made you think otherwise. |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2015 11:36 PM |
| @Lil, just thank the bricks that cntkillme isn't here, YOU WOULD BE DEAD! |
|
|
| Report Abuse |
|
|