Reflection or rebound angle

How to make an object ‘rebound’ off a surface? For example, if I fire a bullet at a wall and want it to bounce off. I want the angle of incidence = angle of reflection. I drew a picture because this explaination may be unclear.

Thank you very much for any help. :slight_smile:

Set direction of object to direction +180 degrees.

Though you’ll have to consider direction of object in your movement routine.

Perhaps the question was not quite clear enough, sorry.

I have a ball bouncing of the floor. I want to delete all y force and put in a new y force, but preserve all x forces. So the angles will be equal, but the speed of the rebound will be different.

No, I’m pretty sure you need to change Direction of ball and consider it in Ball’s movement code.