What's Raycast Direction?

Hey guys, So, I am learning raycasting, but idk what Raycast Direction is? Is it basically an orientation value? (Argument 2 of workspace:RayCast()). Please let me know what it is! Thank you.

1 Like

its where its pointing at, whether thats a vector3 or even your characters hrp lookvector

Just like the first argument (a vector), the direction argument is another vector used to specify the direction to cast from the given origin. So the ray starts in the origin and points in the given direction with the length/magnitude of the directional vector.

Here is an artistic sketch to get the idea (all rights reserved :smile:):

The red vector is the ray, starting at the orgin (orange vector), and the purple vector represents direction.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.