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

in Engine by (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

by (21,973 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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.