Built in raytracing?

Regarding this question, I was wondering if .NET has any libraries (or functions) that I can use to detect if one point collides with another.

I'm not sure which angles I should use, but is there any function like this

func(point src, rect target, angle, distanceOfVision, listPointOrRectOfWalls)

Pretty unlikely, but I don't know the formula or how to start. Its a quick and dirty prototype. I am thinking of writing a func function, but reducing the angle, making the line of sight a rectangle and checking to see if there are any wall points between src and target.

+3
source share
1 answer

I would solve the problem as such:

+3

Source: https://habr.com/ru/post/1742409/


All Articles