vastqud
|
  |
| Joined: 10 Sep 2011 |
| Total Posts: 2464 |
|
|
| 11 Jul 2016 02:08 PM |
| is lookvector the direction that the frontsurface of a part is facing(if you're using it to get the lookvector of a part), or something else? I'm confused on this |
|
|
| Report Abuse |
|
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 11 Jul 2016 02:12 PM |
If I understand correctly, here's what lookVector is:
-it describes an object's rotation -all three digits in the object's rotation are turned into a percent of the sum of the three digits -lookVector returns a Vector3 composed of the three percents -the sum of all three digits of the new Vector3 is always 1 -lookVector is useful when you want to send an object in the direction of another object at a certain velocity, such as bullet.Velocity handle.CFrame.lookVector*80 |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2016 02:12 PM |
It is the direction that the CFrame is facing, so yeah, the front surface of the part.
0, 1, 0 means the part is facing upwards 1, 0, 0 means the part is facing in the positive X direction.
|
|
|
| Report Abuse |
|
|
|
| 11 Jul 2016 02:15 PM |
They are certainly not percents. It's just the vector it is facing, with a magnitude of 1.
0.707, 0.707, 0 is a valid lookVector, but 0.5, 0.5, 0 (Or percents) isn't. It doesn't have a magnitude of 1.
|
|
|
| Report Abuse |
|
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 11 Jul 2016 02:20 PM |
| They are percents, just out of 1 instead of 100, just like all other roblox percents. |
|
|
| Report Abuse |
|
|
Egzekiel
|
  |
| Joined: 10 Jan 2011 |
| Total Posts: 1079 |
|
|
| 11 Jul 2016 02:24 PM |
You just have to imagine a 3D circle (usually known as a sphere LOL) and you determine the position of the points with quaternions (cos and sin for a circle)
|
|
|
| Report Abuse |
|
|
|
| 11 Jul 2016 02:41 PM |
"They are percents, just out of 1 instead of 100, just like all other roblox percents." That's not a percent then. It's a decimal fraction. That's also not my point.
"all three digits in the object's rotation are turned into a percent of the sum of the three digits" My point is, this isn't true.
"the sum of all three digits of the new Vector3 is always 1" That's not true either. math.sqrt(X^2+Y^2+Z^2) always equals 1. NOT the sum.
|
|
|
| Report Abuse |
|
|
EgoMoose
|
  |
| Joined: 04 Feb 2009 |
| Total Posts: 2896 |
|
|
| 11 Jul 2016 02:48 PM |
I think there are some misconceptions here as to what a vector is. I'm also not sure where you're getting quaternions from all this XD.
Anyways, in terms of getting a better understanding of vectors you can try to give the vector review/math part of this a read.
http://wiki.roblox.com/index.php?title=Dot_product
As for what a rotation matrix is you can read here:
http://wiki.roblox.com/index.php?title=CFrame#Rotation_Matrix
For a better understanding of the relation of lookVectors to the rotation matrix I recommend this:
http://wiki.roblox.com/index.php?title=User:MrNicNac/CFrame_Cheat_Sheet/proto
And for the relation of the rotation matrix to quaternions (which is largely out of the scope of this question):
http://wiki.roblox.com/index.php?title=Quaternions_for_rotation#Quaternion_from_a_Rotation_Matrix
|
|
|
| Report Abuse |
|
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 11 Jul 2016 06:43 PM |
| It is a percent! Sort of! I'm sure of it! |
|
|
| Report Abuse |
|
|