How Do I Make A Ball Be Animated At A Specifc Part Depending On A Contact Point With A Wall

What I mean by the title is that I’m creating a Pong clone and I want the ball to not spin(which I know how to do), but I want to ball to play a little bouncing animation whenever it hits the wall and at the specific contact point at which it hits the wall. I’ve searched this up but I haven’t found any answer.

Another option for me would be to add a “Bounce Animation” game object that moves to where the contact point was and then play an animation there, but I don’t know how to do that either.

Does anyone have any ideas, or should I just leave it without an animation?

For clarification, I’m trying to make it, so I can use only one animation for this. I’ve created the animation as a normal ball recoiling against something.

Also, I don’t knwo if it’s possible, but I have a “logo” on the ball sprite that I have, and I’d rather keep it in the same position, even after it bounces.

Thank You.

Hurry to any one of the ten billion Youtube tutorials for that. If those won’t help, nothing in this little text box will either.

Generally a ball contacts a wall for one frame only. If you feel fancy, replace that one frame with a squished frame aligned to the wall.

To do that, pay attention to the normal property you get back from the ContactPoint2D received in the collision callback. NOTE: if any of that sounds mysterious, again, hurry to Youtube tutorials because nobody is going to retype all the details here in this little box.

I like this guy’s step-at-a-time approach:

Imphenzia: How Did I Learn To Make Games: