0 votes

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

Cooldudue

asked Dec 26, 2019 in Projects by cooldudue (12 points)

Is the rigidbody node the parent? If the structure is

MeshInstance
 - Rigidbody

The rigidbody will fall away from the mesh node.

1 Answer

+1 vote

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

answered Dec 26, 2019 by kidscancode (13,244 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.