reckfellENGINE

SkeletonModification2D

Base class for resources that operate on Bone2Ds in a Skeleton2D.

On this page
class SkeletonModification2DReckfellSharpInherits Resource

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 Reckfell with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

SkeletonModification2DConstructor
# SkeletonModification2D
C#
public SkeletonModification2D();

Properties2

EnabledProperty
# Enabled
C#
public bool Enabled { get; set; }

If true, the modification's SkeletonModification2D._Execute function will be called by the SkeletonModificationStack2D.

ExecutionModeProperty
# ExecutionMode
C#
public int ExecutionMode { get; set; }

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.

Methods13

ClampAnglefloat
# ClampAngle
C#
public float ClampAngle(float angle, float min, float max, bool invert);

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.

Parameters
NameTypeDefault
anglefloat—
minfloat—
maxfloat—
invertbool—
Returns float
GetEditorDrawGizmobool
# GetEditorDrawGizmo
C#
public bool GetEditorDrawGizmo();

Returns whether this modification will call SkeletonModification2D._DrawEditorGizmo in the Reckfell editor to draw modification-specific gizmos.

Returns bool
GetEnabledbool
# GetEnabled
C#
public bool GetEnabled();
Returns bool
GetExecutionModeint
# GetExecutionMode
C#
public int GetExecutionMode();
Returns int
GetIsSetupbool
# GetIsSetup
C#
public bool GetIsSetup();

Returns whether this modification has been successfully setup or not.

Returns bool
GetModificationStackSkeletonModificationStack2D
# GetModificationStack
C#
public SkeletonModificationStack2D GetModificationStack();

Returns the SkeletonModificationStack2D that this modification is bound to. Through the modification stack, you can access the Skeleton2D the modification is operating on.

Returns SkeletonModificationStack2D
SetEditorDrawGizmovoid
# SetEditorDrawGizmo
C#
public void SetEditorDrawGizmo(bool drawGizmo);

Sets whether this modification will call SkeletonModification2D._DrawEditorGizmo in the Reckfell editor to draw modification-specific gizmos.

Parameters
NameTypeDefault
drawGizmobool—
SetEnabledvoid
# SetEnabled
C#
public void SetEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetExecutionModevoid
# SetExecutionMode
C#
public void SetExecutionMode(int executionMode);
Parameters
NameTypeDefault
executionModeint—
SetIsSetupvoid
# SetIsSetup
C#
public void SetIsSetup(bool isSetup);

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.

Parameters
NameTypeDefault
isSetupbool—
_DrawEditorGizmovoid
# _DrawEditorGizmo
C#
public virtual void _DrawEditorGizmo();

Used for drawing editor-only modification gizmos. This function will only be called in the Reckfell editor and can be overridden to draw custom gizmos. Note: You will need to use the Skeleton2D from SkeletonModificationStack2D.GetSkeleton and its draw functions, as the SkeletonModification2D resource cannot draw on its own.

_Executevoid
# _Execute
C#
public virtual void _Execute(double delta);

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

Parameters
NameTypeDefault
deltadouble—
_SetupModificationvoid
# _SetupModification
C#
public virtual void _SetupModification(SkeletonModificationStack2D modificationStack);

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

Parameters
NameTypeDefault
modificationStackSkeletonModificationStack2D—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.