In the game I am making, I need to have objects which bounce off other objects accurately, and I have everything sorted, apart from one thing.
I have the collision detection done, and I can return the object collided with. And I also know the algorithm for finding the angle to bounce at, provided I know the direction the bouncing object is travelling at, and the angle of the surface.
And there is the problem, I don't know how to accurately find the angle of a surface on any particular point on a sprite. If you don't get what I mean yet, here is a diagram accidentally saved in JPG then converted to PNG.
I have the collision detection done, and I can return the object collided with. And I also know the algorithm for finding the angle to bounce at, provided I know the direction the bouncing object is travelling at, and the angle of the surface.
And there is the problem, I don't know how to accurately find the angle of a surface on any particular point on a sprite. If you don't get what I mean yet, here is a diagram accidentally saved in JPG then converted to PNG.

