Documentation Index
Fetch the complete documentation index at: https://mintlify.com/godotengine/godot/llms.txt
Use this file to discover all available pages before exploring further.
RigidBody2D
Inherits: PhysicsBody2D < CollisionObject2D < Node2D < CanvasItem < Node < ObjectDescription
A 2D physics body that is moved by a physics simulation. RigidBody2D implements full 2D physics. It cannot be controlled directly; instead, you must apply forces to it (gravity, impulses, etc.).Properties
The body’s mass.
The body’s linear velocity in pixels per second.
The body’s rotational velocity in radians per second.
Multiplies the gravity applied to the body.
If true, the body is frozen and forces are not applied.
Methods
apply_central_impulse
The impulse vector to apply
apply_impulse
apply_force
apply_torque
Signals
body_entered(body: Node)
Emitted when a body enters into contact with this one.body_exited(body: Node)
Emitted when a body exits contact with this one.Example Usage
- GDScript
- C#