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...
SkeletonModification2D¶
Inherits: Resource < RefCounted < Object
Inherited By: SkeletonModification2DCCDIK, SkeletonModification2DFABRIK, SkeletonModification2DJiggle, SkeletonModification2DLookAt, SkeletonModification2DPhysicalBones, SkeletonModification2DStackHolder, SkeletonModification2DTwoBoneIK
Base class for resources that operate on Bone2Ds in a Skeleton2D.
Description¶
This resource provides an interface that can be expanded so code that operates on Bone2D nodes in a Skeleton2D can be mixed and matched together to create complex interactions.
This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses.
Properties¶
|
||
|
Methods¶
void |
_draw_editor_gizmo ( ) virtual |
void |
|
void |
_setup_modification ( SkeletonModificationStack2D modification_stack ) virtual |
clamp_angle ( float angle, float min, float max, bool invert ) |
|
get_editor_draw_gizmo ( ) const |
|
get_is_setup ( ) const |
|
void |
set_editor_draw_gizmo ( bool draw_gizmo ) |
void |
set_is_setup ( bool is_setup ) |
Property Descriptions¶
bool enabled = true
If true
, the modification's _execute function will be called by the SkeletonModificationStack2D.
int execution_mode = 0
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.
Method Descriptions¶
void _draw_editor_gizmo ( ) virtual
Used for drawing editor-only modification gizmos. This function will only be called in the Godot editor and can be overridden to draw custom gizmos.
Note: You will need to use the Skeleton2D from SkeletonModificationStack2D.get