What does Lookvector mean?

Hello!!

I’m a noob at scripting, so i just went through developer hub and i found about Lookvector. But i couldn’t understand what it is after reading the explaination( I also watched youtube tutorials)

so, Is there anyone who can explain this easily?

4 Likes

LookVector is basically the direction the front surface of the part is looking at
(I don’t really know much other than that because i’ve never use this)

4 Likes

it was helpful,
Thanks for replying!

1 Like

A more in-depth explanation:

The look vector property of a part is the 3d vector describing where the part’s front face is pointing. They have a magnitude of one and are in local space. This means that they are always 1 stud away from the part’s position, and because the position is in local space, it is always (0, 0, 0). This is done so you can multiply things like forces by a part’s look vector without it affecting the force’s power. For example, if a part’s front face is pointing upwards the part’s look vector would be (0, 1, 0).

Example of use (edit):
You want a part to travel at a certain speed in the direction of the front face. To do so, you can multiply the speed by the look vector and then set the body velocity’s velocity to that.

11 Likes

Oh, I got it.
Thank you so much!!

1 Like