How to Make a Sprite Bounce off Another Sprite When in Contact?

I’m making a football game for the game jam, and I want the football to, like, bounce off the other sprite that’s touching it. Does anyone know how to do this?

Please answer!
Thx

2 Likes

depends whether there’s a block to tell what face of the sprite is being hit

1 Like

make it so that the velocity of the sprite goes left or right when the sprite touches the ball or sumthing lol

1 Like

How i’d go about it is using jwunderl/arcade-sprite-util to set the balls velocity at the angle from the player who touched it. However, your projects has extensions incompatible with sprite utils, so i don’t know. Maybe see if the incompatible extensions are actually used, or try a different approach.

1 Like

This might not be much help, but you can look at the physics of the ball in this wallball game I made for my friends

I think you just multiply to velocity by -1 to switch it from negative to positive and the other way around.

1 Like