Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

PhysicsDirectBodyState3D

Inherits: Object

Inherited By: PhysicsDirectBodyState3DExtension

Provides direct access to a physics body in the PhysicsServer3D.

Description

Provides direct access to a physics body in the PhysicsServer3D, allowing safe changes to physics properties. This object is passed via the direct state callback of RigidBody3D, and is intended for changing the direct state of that body. See RigidBody3D._integrate_forces.

Tutorials

Properties

Vector3

angular_velocity

Vector3

center_of_mass

Vector3

center_of_mass_local

Vector3

inverse_inertia

Basis

inverse_inertia_tensor

float

inverse_mass

Vector3

linear_velocity

Basis

principal_inertia_axes

bool

sleeping

float

step

float

total_angular_damp

Vector3

total_gravity

float

total_linear_damp

Transform3D

transform

Methods

void

add_constant_central_force ( Vector3 force=Vector3(0, 0, 0) )

void

add_constant_force ( Vector3 force, Vector3 position=Vector3(0, 0, 0) )

void

add_constant_torque ( Vector3 torque )

void

apply_central_force ( Vector3 force=Vector3(0, 0, 0) )

void

apply_central_impulse ( Vector3 impulse=Vector3(0, 0, 0) )

void

apply_force ( Vector3 force, Vector3 position=Vector3(0, 0, 0) )

void

apply_impulse ( Vector3 impulse, Vector3 position=Vector3(0, 0, 0) )

void

apply_torque ( Vector3 torque )

void

apply_torque_impulse ( Vector3 impulse )

Vector3

get_constant_force ( ) const

Vector3

get_constant_torque ( ) const