Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

PhysicalBone2D

Inherits: RigidBody2D < PhysicsBody2D < CollisionObject2D < Node2D < CanvasItem < Node < Object

A RigidBody2D-derived node used to make Bone2Ds in a Skeleton2D react to physics.

Description

The PhysicalBone2D node is a RigidBody2D-based node that can be used to make Bone2Ds in a Skeleton2D react to physics.

Note: To make the Bone2Ds visually follow the PhysicalBone2D node, use a SkeletonModification2DPhysicalBones modification on the Skeleton2D parent.

Note: The PhysicalBone2D node does not automatically create a Joint2D node to keep PhysicalBone2D nodes together. They must be created manually. For most cases, you want to use a PinJoint2D node. The PhysicalBone2D node will automatically configure the Joint2D node once it's been added as a child node.

Properties

bool

auto_configure_joint

true

int

bone2d_index

-1

NodePath

bone2d_nodepath

NodePath("")

bool

follow_bone_when_simulating

false

bool

simulate_physics

false

Methods

Joint2D

get_joint ( ) const

bool

is_simulating_physics ( ) const