Up to date

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

SkeletonIK3D

Inherits: Node < Object

A node used to rotate all bones of a Skeleton3D bone chain a way that places the end bone at a desired 3D position.

Description

SkeletonIK3D is used to rotate all bones of a Skeleton3D bone chain a way that places the end bone at a desired 3D position. A typical scenario for IK in games is to place a character's feet on the ground or a character's hands on a currently held object. SkeletonIK uses FabrikInverseKinematic internally to solve the bone chain and applies the results to the Skeleton3D bones_global_pose_override property for all affected bones in the chain. If fully applied, this overwrites any bone transform from Animations or bone custom poses set by users. The applied amount can be controlled with the interpolation property.

# Apply IK effect automatically on every new frame (not the current)
skeleton_ik_node.start()

# Apply IK effect only on the current frame
skeleton_ik_node.start(true)

# Stop IK effect and reset bones_global_pose_override on Skeleton
skeleton_ik_node.stop()

# Apply full IK effect
skeleton_ik_node.set_interpolation(1.0)

# Apply half IK effect
skeleton_ik_node.set_interpolation(0.5)

# Apply zero IK effect (a value at or below 0.01 also removes bones_global_pose_override on Skeleton)
skeleton_ik_node.set_interpolation(0.0)

Deprecated. This class is deprecated, and might be removed in a future release.

Tutorials

Properties

float

interpolation

1.0

Vector3

magnet

Vector3(0, 0, 0)

int

max_iterations

10

float

min_distance

0.01

bool

override_tip_basis

true

StringName

root_bone

&""

Transform3D

target

Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)

NodePath

target_node

NodePath("")

StringName

tip_bone

&""

bool

use_magnet

false

Methods

Skeleton3D

get_parent_skeleton (