Hi, I'm new to godot and I'm sturggling to add gravity and bounce to a ball

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By cooldudue

I have a ball in a scene that when I add a rigidbody or a kinematicbody the ball won’t fall. I don’t understand why because the default gravity is 980 and the object has some mass. I am trying to follow this but it seems outdated. If you now a better tutorial that can help teach me the basics I will greatly appreciate that.

Thanks in advance


Is the rigidbody node the parent? If the structure is

 - Rigidbody

The rigidbody will fall away from the mesh node.

Magso | 2019-12-26 13:38

:bust_in_silhouette: Reply From: kidscancode

A rigid body will fall by default as soon as you add it. I’m assuming you’re in 2D, since you mention the default gravity value. Add a rigid body, attach a sprite for appearance and a CollisionShape2D for shape and you should be good.

Once you have the body, adjusting bounce, mass, etc. is done via the body’s properties, in particular the physics_material.

You might find the following links helpful in learning how to use rigid bodies:

Godot Docs: Physics introduction: RigidBody2D
KidsCanCode: Using Rigid Bodies