• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

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