Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Explanation of Ray.new please?

Asked by 9 years ago

What does Ray.new mean?

1 answer

Log in to vote
3
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
9 years ago

'Ray' is the globally-accessible (by default) variable for accessing the constructor for Ray objects, much like 'Instance' is for physical objects.

Ray.new(vec3Origin, vec3Direction) is the constructor for a Ray object, which is really just a line segment. It is used in the raycasting functions for detecting if the line created intersects any Part object.

Ad

Answer this question