I need to detect when a ball crosses a line (raycast + line renderer, for now) that will be between two points (like a soccer goal bow) ... but these points will move around the screen ... How can I detect that? that the ball crossed the line?
Any solution that opens my mind will be helpful for me
Thanks !!!!!
My current version: I thought to put a flag for when the raycast touches the ball, and if dsp stops touching it and the flag is true, it counts as a goal ... but it could happen that it touches the line, bounces with one of the clubs and stops playing the line ... in this case I would count it as goal without having crossed the line ... which would be wrong!