Skip to main content

RigidBody3D

Inherits: PhysicsBody3D < CollisionObject3D < Node3D < Node < Object

Description

A 3D physics body that is moved by a physics simulation. RigidBody3D implements full 3D physics. It cannot be controlled directly; instead, you must apply forces to it.

Properties

float
default:"1.0"
The body’s mass.
Vector3
default:"Vector3(0, 0, 0)"
The body’s linear velocity.
Vector3
default:"Vector3(0, 0, 0)"
The RigidBody3D’s rotational velocity in radians per second.
float
default:"1.0"
Multiplies the gravity applied to the body.
bool
default:"false"
If true, the body is frozen. Gravity and forces are not applied.

Methods

apply_central_impulse

Applies a directional impulse without affecting rotation.

apply_impulse

Applies a positioned impulse to the body.

apply_force

Applies a positioned force to the body.

apply_torque

Applies a rotational force without affecting position.

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