class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectNodeNode3DCollisionObject3DPhysicsBody3D PhysicalBone3D
A physics body used to make bones in a Skeleton3D react to physics.

The PhysicalBone3D node is a physics body that can be used to make bones in a Skeleton3D react to physics.

Enum DampMode<>():Enum

DAMP_MODE_COMBINE = 0

In this mode, the body's damping value is added to any value set in areas or the default value.


DAMP_MODE_REPLACE = 1

In this mode, the body's damping value replaces any value set in areas or the default value.

Enum JointType<>():Enum

JOINT_TYPE_NONE = 0

No joint is applied to the PhysicsBone3D.


JOINT_TYPE_PIN = 1

A pin joint is applied to the PhysicsBone3D.


JOINT_TYPE_CONE = 2

A cone joint is applied to the PhysicsBone3D.


JOINT_TYPE_HINGE = 3

A hinge joint is applied to the PhysicsBone3D.


JOINT_TYPE_SLIDER = 4

A slider joint is applied to the PhysicsBone3D.


JOINT_TYPE_6DOF = 5

A 6 degrees of freedom joint is applied to the PhysicsBone3D.

float angular_damp<>():float

Damps the body's rotation. By default, the body will use the ProjectSettings.physics/3d/default_angular_damp project setting or any value override set by an Area3D the body is in. Depending on angular_damp_mode, you can set angular_damp to be added to or to replace the body's damping value.

See ProjectSettings.physics/3d/default_angular_damp for more details about damping.

DampMode angular_damp_mode<>():DampMode

Defines how angular_damp is applied. See DampMode for possible values.

Vector3 angular_velocity<>():Vector3

The PhysicalBone3D's rotational velocity in radians per second.

Transform3D body_offset<>():Transform3D

Sets the body's transform.

float bounce<>():float

The body's bounciness. Values range from 0 (no bounce) to 1 (full bounciness).

Note: Even with bounce set to 1.0, some energy will be lost over time due to linear and angular damping. To have a PhysicalBone3D that preserves all its energy over time, set bounce to 1.0, linear_damp_mode to DAMP_MODE_REPLACE, linear_damp to 0.0, angular_damp_mode to DAMP_MODE_REPLACE, and angular_damp to 0.0.

bool can_sleep<>():bool

If true, the body is deactivated when there is no movement, so it will not take part in the simulation until it is awakened by an external force.

bool custom_integrator<>():bool

If true, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the _integrate_forces() method, if that virtual method is overridden.

Setting this property will call the method PhysicsServer3D.body_set_omit_force_integration() internally.

float friction<>():float

The body's friction, from 0 (frictionless) to 1 (max friction).

float gravity_scale<>():float

This is multiplied by ProjectSettings.physics/3d/default_gravity to produce this body's gravity. For example, a value of 1.0 will apply normal gravity, 2.0 will apply double the gravity, and 0.5 will apply half the gravity to this body.

Transform3D joint_offset<>():Transform3D

Sets the joint's transform.

Vector3 joint_rotation<>():Vector3

Sets the joint's rotation in radians.

JointType joint_type<>():JointType

Sets the joint type. See JointType for possible values.

float linear_damp<>():float

Damps the body's movement. By default, the body will use ProjectSettings.physics/3d/default_linear_damp or any value override set by an Area3D the body is in. Depending on linear_damp_mode, linear_damp may be added to or replace the body's damping value.

See ProjectSettings.physics/3d/default_linear_damp for more details about damping.

DampMode linear_damp_mode<>():DampMode

Defines how linear_damp is applied. See DampMode for possible values.

Vector3 linear_velocity<>():Vector3

The body's linear velocity in units per second. Can be used sporadically, but don't set this every frame, because physics may run in another thread and runs at a different granularity. Use _integrate_forces() as your process loop for precise control of the body state.

float mass<>():float

The body's mass.

void _integrate_forces<>( PhysicsDirectBodyState3D state=, state:PhysicsDirectBodyState3D=, ):void

Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the custom_integrator property allows you to disable the standard force integration and do fully custom force integration for a body.

void apply_central_impulse<>( Vector3 impulse=, impulse:Vector3=, ):void

Applies a directional impulse without affecting rotation.

An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_integrate_forces" functions otherwise).

This is equivalent to using apply_impulse() at the body's center of mass.

void apply_impulse<>( =, :=, =, :=, =, :=, ):void

Applies a positioned impulse to the PhysicsBone3D.

An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_integrate_forces" functions otherwise).

position is the offset from the PhysicsBone3D origin in global coordinates.

int get_bone_id<>():int

Returns the unique identifier of the PhysicsBone3D.

bool get_simulate_physics<>():bool

Returns true if the PhysicsBone3D is allowed to simulate physics.

bool is_simulating_physics<>():bool

Returns true if the PhysicsBone3D is currently simulating physics.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...