varjoy
(variable)
#1
So, I have a quick question of a ray, the ray size goes acording to the part size?
Example:
This is LookVector, so if I do
local Ray = Ray.new(script.Parent.CFrame.Position, script.Parent.CFrame.Position.Unit * 10)
The ray size would be like the Part size? just extended due to .Unit?
sjr04
(uep)
#2
No. Otherwise Rays would have a Size property.
varjoy
(variable)
#3
So how the Ray would look, like what I mean, is if I make a Ray, the ray let’s suppose it exixts would be like that? or the .Unit * distance?
Rays are basically infinitely small lines that extend in one direction(starting point + Vector3). It’s basically a 1 dimensional shape.
2 Likes
varjoy
(variable)
#5
But,how would it look like if we could tell?
A line extending from the origin to the ending point.
1 Like
You may have to think back to math class in 5th grade (or whenever you learned rays lines and points), but yeah it’s just a 1 dimensional shape.
It has no height or width, it’s just a length extending in a direction from a starting point.
Typically when we cast rays in roblox we do Part.Position
as the origin which would mean the ray starts in the direct center of the part.
You can cast it from anywhere really, but yeah there’s no size to it.
2 Likes