Class reference

TwoBoneIK3D

Inherits IKModifier3D

Rotation based intersection of two circles inverse kinematics solver.

Description

This IKModifier3D requires a pole target. It provides deterministic results by constructing a plane from each joint and pole target and finding the intersection of two circles (disks in 3D). This IK can handle twist by setting the pole direction. If there are more than one bone between each set bone, their rotations are ignored, and the straight line connecting the root-middle and middle-end joints are treated as virtual bones.

Properties

int setting_count = 0

The number of settings.

Methods

int get_end_bone(int index) const

Returns the end bone index.

String get_end_bone_name(int index) const

Returns the end bone name.

int get_middle_bone(int index) const

Returns the middle bone index.

String get_middle_bone_name(int index) const

Returns the middle bone name.

int get_pole_direction(int index) const

Returns the pole direction.

NodePath get_pole_node(int index) const

Returns the pole target node that constructs a plane which the joints are all on and the pole is trying to direct.

int get_root_bone(int index) const

Returns the root bone index.

String get_root_bone_name(int index) const

Returns the root bone name.

NodePath get_target_node(int index) const

Returns the target node that the end bone is trying to reach.

bool is_end_bone_extended(int index) const

Returns true if the end bone is extended to have a tail.

bool is_using_virtual_end(int index) const

Returns true if the end bone is extended from the middle bone as a virtual bone.

void set_end_bone(int index, int bone)

Sets the end bone index.

void set_end_bone_name(int index, String bone_name)

Sets the end bone name. Note: The end bone must be a child of the middle bone.

void set_extend_end_bone(int index, bool enabled)

If enabled is true, the end bone is extended to have a tail.

void set_middle_bone(int index, int bone)

Sets the middle bone index.

void set_middle_bone_name(int index, String bone_name)

Sets the middle bone name. Note: The middle bone must be a child of the root bone.

void set_pole_direction(int index, int direction)

Sets the pole direction. The pole is on the middle bone and will direct to the pole target. The rotation axis is a vector that is orthogonal to this and the forward vector. Note: The pole direction and the forward vector shouldn't be colinear to avoid unintended rotation.

void set_pole_node(int index, NodePath pole_node)

Sets the pole target node that constructs a plane which the joints are all on and the pole is trying to direct.

void set_root_bone(int index, int bone)

Sets the root bone index.

void set_root_bone_name(int index, String bone_name)

Sets the root bone name.

void set_target_node(int index, NodePath target_node)

Sets the target node that the end bone is trying to reach.

void set_use_virtual_end(int index, bool enabled)

If enabled is true, the end bone is extended from the middle bone as a virtual bone.

Source revision 5592dc3a7a61
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.