Hello everyone,
I need some help determining if a line segment (formed between two parts) intersects an edge (one part).
This picture should help to illustrate what I’m trying to do:
I have no idea how to do this, so any help is very appreciated.
Please help.
Rays should work for you.
local p0,p1 --parts for the line local ep --edge part local ray = Ray.new(p0.Position,p1.Position-p0.Position) if workspace:FindPartOnRayWithWhitelist(ray,{ep}) then --stuff end
Wow, I don’t know why I thought it would’ve been more complex.
Thanks for the help!