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.

BoneTwistDisperser3D

Hereda: SkeletonModifier3D < Node3D < Node < Object

Un nodo que propaga y dispersa la torsión del hueso hijo hacia los huesos padres.

Descripción

This BoneTwistDisperser3D allows for smooth twist interpolation between multiple bones by dispersing the end bone's twist to the parents. This only changes the twist without changing the global position of each joint.

This is useful for smoothly twisting bones in combination with CopyTransformModifier3D and IK.

Note: If an extracted twist is greater than 180 degrees, flipping occurs. This is similar to ConvertTransformModifier3D.

Note: Most 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>/root_bone_name).

Propiedades

bool

mutable_bone_axes

true

int

setting_count

0

Métodos

void

clear_settings()

Curve

get_damping_curve(index: int) const

DisperseMode

get_disperse_mode(index: int) const

int

get_end_bone(index: int) const

BoneDirection

get_end_bone_direction(index: int) const

String

get_end_bone_name(index: int) const

int

get_joint_bone(index: int, joint: int) const

String

get_joint_bone_name(index: int, joint: int) const

int

get_joint_count(index: int) const

float

get_joint_twist_amount(index: int, joint: int) const

int

get_reference_bone(index: int) const

String

get_reference_bone_name(index: int) const

int

get_root_bone(index: int) const

String

get_root_bone_name(index: int) const

Quaternion

get_twist_from(index: int) const

float

get_weight_position(index: int) const

bool

is_end_bone_extended(index: int) const

bool

is_twist_from_rest(index: int) const

void

set_damping_curve(index: int, curve: Curve)

void

set_disperse_mode(index: int, disperse_mode: DisperseMode)

void

set_end_bone(index: int, bone: int)

void

set_end_bone_direction(index: int, bone_direction: BoneDirection)

void

set_end_bone_name(index: int, bone_name: String)

void

set_extend_end_bone(index: int, enabled: bool)

void

set_joint_twist_amount(index: int, joint: int, twist_amount: float)

void

set_root_bone(index: int, bone: int)

void

set_root_bone_name(index: int, bone_name: String)

void

set_twist_from(index: int, from: Quaternion)

void

set_twist_from_rest(index: int, enabled: bool)

void

set_weight_position(index: int, weight_position: float)


Enumeraciones

enum DisperseMode: 🔗

DisperseMode DISPERSE_MODE_EVEN = 0

Asigne cantidades de manera que aumenten monótonamente de 0.0 a 1.0, asegurando que todos los pesos sean iguales. Por ejemplo, con cinco articulaciones, las cantidades serían 0.2, 0.4, 0.6, 0.8 y 1.0 comenzando desde el hueso raíz.

DisperseMode DISPERSE_MODE_WEIGHTED = 1

Asigne cantidades de modo que aumenten monótonamente de 0.0 a 1.0, en función de la longitud de los huesos entre los segmentos articulares. Véase también set_weight_position().

DisperseMode DISPERSE_MODE_CUSTOM = 2

Puedes asignar cantidades arbitrarias a la lista de articulaciones. Véase también set_joint_twist_amount().

Cuando is_end_bone_extended() es false, un hijo del hueso de referencia existe únicamente para determinar el eje de torsión, por lo que su cantidad personalizada no tiene absolutamente ningún efecto.


Descripciones de Propiedades

bool mutable_bone_axes = true 🔗

  • void set_mutable_bone_axes(value: bool)

  • bool are_bone_axes_mutable()

If true, the solver retrieves the bone axis from the bone pose every frame.

If false, the solver retrieves the bone axis from the bone rest and caches it.


int setting_count = 0 🔗

  • void set_setting_count(value: int)

  • int get_setting_count()

El número de configuraciones.


Descripciones de Métodos

void clear_settings() 🔗

Limpia todos los ajustes.


Curve get_damping_curve(index: int) const 🔗

Devuelve la curva de amortiguación cuando get_disperse_mode() es DISPERSE_MODE_CUSTOM.


DisperseMode get_disperse_mode(index: int) const 🔗

Devuelve si se debe usar la asignación automática de importes o permitir la asignación manual.


int get_end_bone(index: int) const 🔗

Devuelve el índice del hueso final de la cadena de huesos.


BoneDirection get_end_bone_direction(index: int) const 🔗

Returns the tail direction of the end bone of the bone chain when is_end_bone_extended() is true.


String get_end_bone_name(index: int) const 🔗

Devuelve el nombre del hueso final de la cadena de huesos.


int get_joint_bone(index: int, joint: int) const 🔗

Devuelve el índice del hueso en la articulación joint de la lista de articulaciones de la cadena de huesos.


String get_joint_bone_name(index: int, joint: int) const 🔗

Devuelve el nombre del hueso en la articulación joint de la lista de articulaciones de la cadena de huesos.


int get_joint_count(index: int) const 🔗

Devuelve el número de articulaciones de la lista de articulaciones de la cadena de huesos.


float get_joint_twist_amount(index: int, joint: int) const 🔗

Devuelve la cantidad de torsión en joint en la lista de articulaciones de la cadena de huesos cuando get_disperse_mode() es DISPERSE_MODE_CUSTOM.


int get_reference_bone(index: int) const 🔗

Returns the reference bone to extract twist of the setting at index.

This bone is either the end of the chain or its parent, depending on is_end_bone_extended().


String get_reference_bone_name(index: int) const 🔗

Returns the reference bone name to extract twist of the setting at index.

This bone is either the end of the chain or its parent, depending on is_end_bone_extended().


int get_root_bone(index: int) const 🔗

Devuelve el índice del hueso raíz de la cadena de huesos.


String get_root_bone_name(index: int) const 🔗

Devuelve el nombre del hueso raíz de la cadena de huesos.


Quaternion get_twist_from(index: int) const 🔗

Returns the rotation to an arbitrary state before twisting for the current bone pose to extract the twist when is_twist_from_rest() is false.


float get_weight_position(index: int) const 🔗

Devuelve la posición en la que dividir el segmento entre articulaciones para la asignación de peso cuando get_disperse_mode() es DISPERSE_MODE_WEIGHTED.


bool is_end_bone_extended(index: int) const 🔗

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


bool is_twist_from_rest(index: int) const 🔗

Returns true if extracting the twist amount from the difference between the bone rest and the current bone pose.


void set_damping_curve(index: int, curve: Curve) 🔗

Fija la curva de amortiguación cuando get_disperse_mode() es DISPERSE_MODE_CUSTOM.


void set_disperse_mode(index: int, disperse_mode: DisperseMode) 🔗

Establece si se debe utilizar la asignación automática de importes o permitir la asignación manual.


void set_end_bone(index: int, bone: int) 🔗

Establece el índice del hueso final de la cadena de huesos.


void set_end_bone_direction(index: int, bone_direction: BoneDirection) 🔗

Establece la dirección de la cola del hueso final de la cadena de huesos cuando is_end_bone_extended() es true.


void set_end_bone_name(index: int, bone_name: String) 🔗

Sets the end bone name of the bone chain.

Note: The end bone must be a child of the root bone.


void set_extend_end_bone(index: int, enabled: bool) 🔗

Si enabled es true, el hueso final se extiende para tener una cola.

Si enabled es false, get_reference_bone() se convierte en padre del hueso final y utiliza el vector hacia el hueso final como eje de torsión.


void set_joint_twist_amount(index: int, joint: int, twist_amount: float) 🔗

Establece la cantidad de torsión en joint en la lista de articulaciones de la cadena de huesos cuando get_disperse_mode() es DISPERSE_MODE_CUSTOM.


void set_root_bone(index: int, bone: int) 🔗

Establece el índice del hueso raíz de la cadena de huesos.


void set_root_bone_name(index: int, bone_name: String) 🔗

Establece el nombre del hueso raíz de la cadena de huesos.


void set_twist_from(index: int, from: Quaternion) 🔗

Establece la rotación a un estado arbitrario antes de girar para la pose ósea actual para extraer el giro cuando is_twist_from_rest() es false.

En otras palabras, al llamar a set_twist_from() por SkeletonModifier3D.modification_processed de un SkeletonModifier3D específico, puede extraer solo los giros generados por los modificadores procesados después de eso pero antes de este BoneTwistDisperser3D.


void set_twist_from_rest(index: int, enabled: bool) 🔗

Si enabled es true, extrae la cantidad de torsión de la diferencia entre el reposo del hueso y la pose actual del hueso.

Si enabled es false, extrae la cantidad de torsión de la diferencia entre get_twist_from() y la pose actual del hueso. Véase también set_twist_from().


void set_weight_position(index: int, weight_position: float) 🔗

Establece la posición en la que se divide el segmento entre las articulaciones para la asignación de peso cuando get_disperse_mode() es DISPERSE_MODE_WEIGHTED.

Por ejemplo, cuando weight_position es 0.5, si existen dos segmentos óseos con una longitud de 1.0 entre tres articulaciones, se asignan pesos a cada articulación desde la raíz hasta el extremo en proporciones de 0.5, 1.0 y 0.5. Entonces, las cantidades se convierten en 0.25, 0.75 y 1.0 respectivamente.