How to make objects bounce instead of rolling?

Godot Version

4.2.2

Question

So, I’m having an issue with this interaction. I would prefer for the ball to bounce off of angled surfaces like this instead of rolling off of them. Physically it makes sense that a ball would roll there, but it would feel a lot better if it bounced instead.

Honestly I haven’t had any sort of physics problems yet, so I’m not even sure how to go about this. The ball is a rigidbody2d and the walls are all staticbody2ds.

The only thing I could think of is instead of actually using the built-in physics engine, is to write a function that when there is a collision, it modifies the balls angle by the rotation of whatever object it collided with. But uh, that sounds like over-engineering, and I’m really hoping there’s a more obvious solution that I’m missing.

Set the “Physics Material Override” of the ball to something with a high bounce value of 1.

I assume you are referring to the bounce setting here?
image

If so, the original video posted is the interaction with the bounce already set to 1.

1 Like

So what is all happening in that one second video? Is the blue paddle a StaticBody2D? Is it being moved through scripts? If so try changing it to a AnimatableBody2D

Okay, that works a lot better! I’m going to do a deep dive into different node types because I didn’t even realized that existed somehow.

It’s just a shame that AnimatableBody2D doesn’t work very well when attached to players.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.