excreationist
Married mouth-breather
I was wondering about a mathematical formula to detect the collision with a start X and Y (green), an end X and Y (red), and the player X and Y (cyan). Either the player would have a circle (with a given radius) or it would be a point and the line would have a given thickness (doesn't need curved ends). They might be equivalent?
The purpose is to have a victim (green) in the game that the player (cyan) is chasing. It then generates a random destination and checks if it will collide (or go near) the player on its way to the destination (red).
It should use the least amount of CPU as possible (i.e. try to avoid loops, etc)
Thanks!
The purpose is to have a victim (green) in the game that the player (cyan) is chasing. It then generates a random destination and checks if it will collide (or go near) the player on its way to the destination (red).
It should use the least amount of CPU as possible (i.e. try to avoid loops, etc)
Thanks!