SkeletonModification2D
Experimental: This class may be changed or removed in future versions.
Hereda: Resource < RefCounted < Object
Heredado por: SkeletonModification2DCCDIK, SkeletonModification2DFABRIK, SkeletonModification2DJiggle, SkeletonModification2DLookAt, SkeletonModification2DPhysicalBones, SkeletonModification2DStackHolder, SkeletonModification2DTwoBoneIK
Clase base para los recursos que operan sobre Bone2Ds en un Skeleton2D.
Descripción
Este recurso proporciona una interfaz que puede ser expandida para que el código que opera en nodos Bone2D en un Skeleton2D pueda ser mezclado y combinado para crear interacciones complejas.
Esto es usado para proveer a Godot con una solución de Cinemática Inversa flexible y poderosa que puede ser adaptada para muchos usos diferentes.
Propiedades
|
||
|
Métodos
void |
_draw_editor_gizmo() virtual |
void |
|
void |
_setup_modification(modification_stack: SkeletonModificationStack2D) virtual |
clamp_angle(angle: float, min: float, max: float, invert: bool) |
|
get_editor_draw_gizmo() const |
|
get_is_setup() const |
|
void |
set_editor_draw_gizmo(draw_gizmo: bool) |
void |
set_is_setup(is_setup: bool) |
Descripciones de Propiedades
If true, the modification's _execute() function will be called by the SkeletonModificationStack2D.
The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only available in certain execution modes.
Descripciones de Métodos
void _draw_editor_gizmo() virtual 🔗
Usado para dibujar gizmos de modificación solo para el editor. Esta función solo será llamada en el editor de Godot y puede ser sobreescrita para dibujar gizmos personalizados.
Nota: Necesitarás usar el Skeleton2D de SkeletonModificationStack2D.get_skeleton() y sus funciones de dibujo, ya que el recurso SkeletonModification2D no puede dibujar por sí solo.
void _execute(delta: float) virtual 🔗
Ejecuta la modificación dada. Aquí es donde la modificación realiza cualquier función para la que esté diseñada.
void _setup_modification(modification_stack: SkeletonModificationStack2D) virtual 🔗
Se llama cuando se configura la modificación. Aquí es donde la modificación realiza la inicialización.
float clamp_angle(angle: float, min: float, max: float, invert: bool) 🔗
Toma un ángulo y lo limita para que esté dentro del rango min y max pasados. invert invertirá la limitación del ángulo, limitándolo al rango fuera de los límites dados.
bool get_editor_draw_gizmo() const 🔗
Returns whether this modification will call _draw_editor_gizmo() in the Godot editor to draw modification-specific gizmos.
Returns whether this modification has been successfully setup or not.
SkeletonModificationStack2D get_modification_stack() 🔗
Returns the SkeletonModificationStack2D that this modification is bound to. Through the modification stack, you can access the Skeleton2D the modification is operating on.
void set_editor_draw_gizmo(draw_gizmo: bool) 🔗
Sets whether this modification will call _draw_editor_gizmo() in the Godot editor to draw modification-specific gizmos.
void set_is_setup(is_setup: bool) 🔗
Manually allows you to set the setup state of the modification. This function should only rarely be used, as the SkeletonModificationStack2D the modification is bound to should handle setting the modification up.