class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectRefCountedResource SkeletonModification2D
Base class for resources that operate on Bone2Ds in a Skeleton2D.

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.

bool enabled<>():bool

If true, the modification's _execute() function will be called by the SkeletonModificationStack2D.

int execution_mode<>():int

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.

void _draw_editor_gizmo<>():void

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_skeleton() and it's draw functions, as the SkeletonModification2D resource cannot draw on its own.

void _execute<>( float delta=, delta:float=, ):void

Executes the given modification. This is where the modification performs whatever function it is designed to do.

void _setup_modification<>( SkeletonModificationStack2D modification_stack=, modification_stack:SkeletonModificationStack2D=, ):void

Called when the modification is setup. This is where the modification performs initialization.

float clamp_angle<>( float angle=, angle:float=, float min=, min:float=, float max=, max:float=, bool invert=, invert:bool=, ):float

Takes an angle and clamps it so it is within the passed-in min and max range. invert will inversely clamp the angle, clamping it to the range outside of the given bounds.

bool get_editor_draw_gizmo<>():bool

Returns whether this modification will call _draw_editor_gizmo() in the Godot editor to draw modification-specific gizmos.

bool get_is_setup<>():bool

Returns whether this modification has been successfully setup or not.

SkeletonModificationStack2D get_modification_stack<>():SkeletonModificationStack2D

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<>( bool draw_gizmo=, draw_gizmo:bool=, ):void

Sets whether this modification will call _draw_editor_gizmo() in the Godot editor to draw modification-specific gizmos.

void set_is_setup<>( bool is_setup=, is_setup:bool=, ):void

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.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...