GameMaker predicting bounce angle

Didjargo

Member
Let's say for the sake of example, I were programming a pool-table like game. Would anyone be willing and able to help me in writing a script where it can calculate the predicted angle that an object will bounce off another object? This is for the purpose of displaying an arrow to where a ball will go when launched and where it will bounce towards when it hits the first immediate obstacle. I've pretty much got it where it displays where the ball will contact its immediate obstacle, but calculating the predicted bounce angle to show where it will go afterwards is beyond me. By the way, I am programming this in GMS2's physics engine.
 
Top