What does adding vector 3 to lookvector mean?

game.Workspace.cam.CFrame.LookVector + distancefromcam

whats does this mean

I always do LookVector * 15 (number)

But what is adding to a look vector i know its not used much and its complex but its used in many scripts I found

Look Vector is the way in which an object is facing. If say I added a bodyvelocity and told it to add velocity to the parts lookvector. It would be adding velocity in the direction of which the part is facing. In this case it looks as if the code is getting the direction in which the camera is facing, then adding a variable to that result.

1 Like

Yes thank you both for answering but the question is why you need to add 2 vector in this script?

game.Workspace.cam.CFrame.LookVector + distancefromcam

It says look vector, ok so front direction
Now now if I multiple it by any number like LookVector*15 you get a vector3() value in which one value is 15 and other is 0, so now its not multiplying by any number so it would be
Vector3.new(0,0,0)

But whats the use of adding a vector with no value, i mean like it don’t have any change to the value as if you add 0 to 10 its 10 ofc no change at all so now whats the use of adding it, is that script line have another thing or its just there for nothing

If you multiply LookVector by 15 and that gives Vector3.new(15, 0, 0), then LookVector is Vector3.new(1, 0, 0).
If you do not multiply LookVector, it would in this case return Vector3.new(1, 0, 0), not Vector3.new(0, 0, 0).
If it helps, think of it as multiplying LookVector by 1, and then adding distancefromcam.

1 Like