Get coordinates of collision for minigolf game

J

Jasper

Guest
Hi all,

I'm looking for a way to to detect the exact coordinates at which a collision between two objects is happening. I'm making a game similar to minigolf, so I need to set the bouncing direction as accurate as possible when the ball collides with a wall or other object. In the image I provided you see the ball and wall in black, and the red lines as directions that the ball should go in before and after the bounce. To calculate this though, I need the coordinates of the collision (blue circle) so I can set the direction from there based on the center of the ball.

collision coordinates.png

I'm not very experienced in gamemaker programming and cannot seem to find how to do it. Can someone help me out?

Thanks a lot!
 
Top