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.
Checking the stable version of the documentation...
IterateIK3D
Успадковує: ChainIK3D < IKModifier3D < SkeletonModifier3D < Node3D < Node < Object
Успадковано від: CCDIK3D, FABRIK3D, JacobianIK3D
SkeletonModifier3D для наближення до мети шляхом повторення невеликих обертань.
Опис
Base class of SkeletonModifier3D to approach the goal by repeating small rotations.
Each bone chain (setting) has one effector, which is processed in order of the setting list. You can set some limitations for each joint.
Note: All the methods in this class take an index parameter. This parameter specifies which setting list entry to return if the IK has multiple entries (e.g. settings/<index>/target_node).
Властивості
|
||
|
||
|
||
|
||
|
Методи
get_joint_limitation(index: int, joint: int) const |
|
SecondaryDirection |
get_joint_limitation_right_axis(index: int, joint: int) const |
Vector3 |
get_joint_limitation_right_axis_vector(index: int, joint: int) const |
Quaternion |
get_joint_limitation_rotation_offset(index: int, joint: int) const |
RotationAxis |
get_joint_rotation_axis(index: int, joint: int) const |
Vector3 |
get_joint_rotation_axis_vector(index: int, joint: int) const |
NodePath |
get_target_node(index: int) const |
void |
set_joint_limitation(index: int, joint: int, limitation: JointLimitation3D) |
void |
set_joint_limitation_right_axis(index: int, joint: int, direction: SecondaryDirection) |
void |
set_joint_limitation_right_axis_vector(index: int, joint: int, vector: Vector3) |
void |
set_joint_limitation_rotation_offset(index: int, joint: int, offset: Quaternion) |
void |
set_joint_rotation_axis(index: int, joint: int, axis: RotationAxis) |
void |
set_joint_rotation_axis_vector(index: int, joint: int, axis_vector: Vector3) |
void |
set_target_node(index: int, target_node: NodePath) |
Описи властивостей
float angular_delta_limit = 0.034906585 🔗
Максимальна величина, на яку кожна кістка може повернутись за одну ітерацію.
Примітка: Це обмеження застосовується під час кожної ітерації. Наприклад, якщо max_iterations дорівнює 4, а angular_delta_limit дорівнює 5 градусів, максимально можливе обертання за один кадр становить 20 градусів.
Якщо значення false, результат обчислюється з результату IterateIK3D попереднього кадру як початкового стану.
Якщо значення true, результат IterateIK3D попереднього кадру відкидається. У цей момент новий результат обчислюється з пози кістки, виключаючи IterateIK3D як початковий стан. Це означає, що результат завжди буде однаковим, якщо цільова позиція та попередня поза кістки однакові. Однак, якщо значення angular_delta_limit та max_iterations встановлено занадто малими, кінцева кістка ланцюга ніколи не досягне цілі.
Кількість циклів ітерацій, що використовуються розв'язувачем IK для отримання точніших результатів.
Мінімальна відстань між кінцевою кісткою та цільовою точкою. Якщо відстань менша за це значення, розв'язувач IK зупиняє будь-які подальші ітерації.
Кількість налаштувань.
Описи методів
JointLimitation3D get_joint_limitation(index: int, joint: int) const 🔗
Повертає обмеження суглоба за параметром joint у списку суглобів ланцюжка кісток.
SecondaryDirection get_joint_limitation_right_axis(index: int, joint: int) const 🔗
Повертає праву вісь обмеження суглоба в joint у списку суглобів ланцюжка кісток.
Vector3 get_joint_limitation_right_axis_vector(index: int, joint: int) const 🔗
Повертає вектор правої осі обмеження суглоба в точці joint у списку суглобів ланцюга кісток.
Якщо get_joint_limitation_right_axis() має значення SkeletonModifier3D.SECONDARY_DIRECTION_NONE, цей метод повертає Vector3(0, 0, 0).
Quaternion get_joint_limitation_rotation_offset(index: int, joint: int) const 🔗
Returns the joint limitation rotation offset at joint in the bone chain's joint list.
Rotation is done in the local space which is constructed by the bone direction (in general parent to child) as the +Y axis and get_joint_limitation_right_axis_vector() as the +X axis.
If the +X and +Y axes are not orthogonal, the +X axis is implicitly modified to make it orthogonal.
Also, if the length of get_joint_limitation_right_axis_vector() is zero, the space is created by rotating the reference pose using the shortest arc that rotates the +Y axis of the reference pose to match the bone direction.
In here, the reference pose is the bone pose immediately before processing IK.
RotationAxis get_joint_rotation_axis(index: int, joint: int) const 🔗
Повертає вісь обертання в joint у списку суглобів кісткового ланцюга.
Vector3 get_joint_rotation_axis_vector(index: int, joint: int) const 🔗
Повертає вектор осі обертання для зазначеного суглоба в ланцюжку кісток. Цей вектор представляє вісь, навколо якої може обертатися суглоб. Він визначається на основі осі обертання, встановленої для суглоба.
Якщо get_joint_rotation_axis() має значення SkeletonModifier3D.ROTATION_AXIS_ALL, цей метод повертає Vector3(0, 0, 0).
NodePath get_target_node(index: int) const 🔗
Повертає цільовий вузол, якого намагається досягти кінцева кістка.
void set_joint_limitation(index: int, joint: int, limitation: JointLimitation3D) 🔗
Встановлює обмеження суглоба на joint у списку суглобів ланцюжка кісток.
void set_joint_limitation_right_axis(index: int, joint: int, direction: SecondaryDirection) 🔗
Встановлює праву вісь обмеження суглоба на joint у списку суглобів ланцюжка кісток.
void set_joint_limitation_right_axis_vector(index: int, joint: int, vector: Vector3) 🔗
Встановлює необов'язковий вектор правої осі обмеження суглоба в joint у списку суглобів ланцюжка кісток.
void set_joint_limitation_rotation_offset(index: int, joint: int, offset: Quaternion) 🔗
Sets the joint limitation rotation offset at joint in the bone chain's joint list.
Rotation is done in the local space which is constructed by the bone direction (in general parent to child) as the +Y axis and get_joint_limitation_right_axis_vector() as the +X axis.
If the +X and +Y axes are not orthogonal, the +X axis is implicitly modified to make it orthogonal.
Also, if the length of get_joint_limitation_right_axis_vector() is zero, the space is created by rotating the reference pose using the shortest arc that rotates the +Y axis of the reference pose to match the bone direction.
In here, the reference pose is the bone pose immediately before processing IK.
void set_joint_rotation_axis(index: int, joint: int, axis: RotationAxis) 🔗
Sets the rotation axis at joint in the bone chain's joint list.
The axes are based on the reference pose's space, if axis is SkeletonModifier3D.ROTATION_AXIS_CUSTOM, you can specify any axis.
In here, the reference pose is the bone pose immediately before processing IK.
Note: The rotation axis and the forward vector shouldn't be colinear to avoid unintended rotation since ChainIK3D does not factor in twisting forces.
void set_joint_rotation_axis_vector(index: int, joint: int, axis_vector: Vector3) 🔗
Встановлює вектор осі обертання для зазначеного суглоба в ланцюжку кісток.
Цей вектор нормалізується внутрішнім процесом і представляє вісь, навколо якої може обертатися ланцюжок кісток.
Якщо довжина вектора дорівнює 0, він вважається синонімом SkeletonModifier3D.ROTATION_AXIS_ALL.
void set_target_node(index: int, target_node: NodePath) 🔗
Встановлює цільовий вузол, якого намагається досягти кінцева кістка.