you can drag th point(p is the player d the end of the ray and e the enemi) and see if the enemie is touched by the ray