0 votes

I'm using RigidBody2D (Character mode) for a massive stone door that falls. Currently, if the player pushes it, it moves like it doesn't weight anything. The weight and mass properties in the inspector, doesn't help.

Sample

in Engine by (41 points)

1 Answer

+1 vote
Best answer

Is your player a KinematicBody2D? If so this is because it has infinite_inertia enabled by default. See https://docs.godotengine.org/en/latest/classes/class_kinematicbody2d.html#class-kinematicbody2d-method-move-and-slide for details.

If you disable this, you won't be able to push the rigid body without applying a force to it.

by (20,899 points)
selected by

Thanks! that did the trick. Is there any cons of using it this way? Should I use a StaticBody2D and code the gravity instead? I believe the only thing I using from the physics engine is the gravity.

No, static bodies should not be moved at all.

There are always pros/cons between using rigid vs. kinematic. With kinematic, you'd need to apply gravity yourself, but you have more control over its movement.

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.
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 webmaster@godotengine.org with your username.