reckfellENGINE

SkeletonModification2DJiggle

A modification that jiggles Bone2D nodes as they move towards a target.

On this page
class SkeletonModification2DJiggleReckfellSharpInherits SkeletonModification2D

A modification that jiggles Bone2D nodes as they move towards a target.

This modification moves a series of bones, typically called a bone chain, towards a target. What makes this modification special is that it calculates the velocity and acceleration for each bone in the bone chain, and runs a very light physics-like calculation using the inputted values. This allows the bones to overshoot the target and "jiggle" around. It can be configured to act more like a spring, or sway around like cloth might. This modification is useful for adding additional motion to things like hair, the edges of clothing, and more. It has several settings to that allow control over how the joint moves when the target moves. Note: The Jiggle modifier has jiggle_joints, which are the data objects that hold the data for each joint in the Jiggle chain. This is different from than Bone2D nodes! Jiggle joints hold the data needed for each Bone2D in the bone chain used by the Jiggle modification.

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

Constructors1

SkeletonModification2DJiggleConstructor
# SkeletonModification2DJiggle
C#
public SkeletonModification2DJiggle();

Properties7

DampingProperty
# Damping
C#
public float Damping { get; set; }

The default amount of damping applied to the Jiggle joints, if they are not overridden. Higher values lead to more of the calculated velocity being applied.

GravityProperty
# Gravity
C#
public Vector2 Gravity { get; set; }

The default amount of gravity applied to the Jiggle joints, if they are not overridden.

JiggleDataChainLengthProperty
# JiggleDataChainLength
C#
public int JiggleDataChainLength { get; set; }

The amount of Jiggle joints in the Jiggle modification.

MassProperty
# Mass
C#
public float Mass { get; set; }

The default amount of mass assigned to the Jiggle joints, if they are not overridden. Higher values lead to faster movements and more overshooting.

StiffnessProperty
# Stiffness
C#
public float Stiffness { get; set; }

The default amount of stiffness assigned to the Jiggle joints, if they are not overridden. Higher values act more like springs, quickly moving into the correct position.

TargetEntitypathProperty
# TargetEntitypath
C#
public EntityPath TargetEntitypath { get; set; }

The EntityPath to the node that is the target for the Jiggle modification. This node is what the Jiggle chain will attempt to rotate the bone chain to.

UseGravityProperty
# UseGravity
C#
public bool UseGravity { get; set; }

Whether the gravity vector, SkeletonModification2DJiggle.Gravity, should be applied to the Jiggle joints, assuming they are not overriding the default settings.

Methods35

GetCollisionMaskint
# GetCollisionMask
C#
public int GetCollisionMask();

Returns the collision mask used by the Jiggle modifier when collisions are enabled.

Returns int
GetDampingfloat
# GetDamping
C#
public float GetDamping();
Returns float
GetGravityVector2
# GetGravity
C#
public Vector2 GetGravity();
Returns Vector2
GetJiggleDataChainLengthint
# GetJiggleDataChainLength
C#
public int GetJiggleDataChainLength();
Returns int
GetJiggleJointBone2DEntityEntityPath
# GetJiggleJointBone2DEntity
C#
public EntityPath GetJiggleJointBone2DEntity(int jointIdx);

Returns the Bone2D node assigned to the Jiggle joint at joint_idx.

Parameters
NameTypeDefault
jointIdxint—
Returns EntityPath
GetJiggleJointBoneIndexint
# GetJiggleJointBoneIndex
C#
public int GetJiggleJointBoneIndex(int jointIdx);

Returns the index of the Bone2D node assigned to the Jiggle joint at joint_idx.

Parameters
NameTypeDefault
jointIdxint—
Returns int
GetJiggleJointDampingfloat
# GetJiggleJointDamping
C#
public float GetJiggleJointDamping(int jointIdx);

Returns the amount of damping of the Jiggle joint at joint_idx.

Parameters
NameTypeDefault
jointIdxint—
Returns float
GetJiggleJointGravityVector2
# GetJiggleJointGravity
C#
public Vector2 GetJiggleJointGravity(int jointIdx);

Returns a Vector2 representing the amount of gravity the Jiggle joint at joint_idx is influenced by.

Parameters
NameTypeDefault
jointIdxint—
Returns Vector2
GetJiggleJointMassfloat
# GetJiggleJointMass
C#
public float GetJiggleJointMass(int jointIdx);

Returns the amount of mass of the jiggle joint at joint_idx.

Parameters
NameTypeDefault
jointIdxint—
Returns float
GetJiggleJointOverridebool
# GetJiggleJointOverride
C#
public bool GetJiggleJointOverride(int jointIdx);

Returns a boolean that indicates whether the joint at joint_idx is overriding the default Jiggle joint data defined in the modification.

Parameters
NameTypeDefault
jointIdxint—
Returns bool
GetJiggleJointStiffnessfloat
# GetJiggleJointStiffness
C#
public float GetJiggleJointStiffness(int jointIdx);

Returns the stiffness of the Jiggle joint at joint_idx.

Parameters
NameTypeDefault
jointIdxint—
Returns float
GetJiggleJointUseGravitybool
# GetJiggleJointUseGravity
C#
public bool GetJiggleJointUseGravity(int jointIdx);

Returns a boolean that indicates whether the joint at joint_idx is using gravity or not.

Parameters
NameTypeDefault
jointIdxint—
Returns bool
GetMassfloat
# GetMass
C#
public float GetMass();
Returns float
GetStiffnessfloat
# GetStiffness
C#
public float GetStiffness();
Returns float
GetTargetEntityEntityPath
# GetTargetEntity
C#
public EntityPath GetTargetEntity();
Returns EntityPath
GetUseCollidersbool
# GetUseColliders
C#
public bool GetUseColliders();

Returns whether the jiggle modifier is taking physics colliders into account when solving.

Returns bool
GetUseGravitybool
# GetUseGravity
C#
public bool GetUseGravity();
Returns bool
Resetvoid
# Reset
C#
public void Reset();

Resets the internal jiggle simulation state to the current bone positions, clearing velocity, acceleration, and accumulated forces.

SetCollisionMaskvoid
# SetCollisionMask
C#
public void SetCollisionMask(int collisionMask);

Sets the collision mask that the Jiggle modifier will use when reacting to colliders, if the Jiggle modifier is set to take colliders into account.

Parameters
NameTypeDefault
collisionMaskint—
SetDampingvoid
# SetDamping
C#
public void SetDamping(float damping);
Parameters
NameTypeDefault
dampingfloat—
SetGravityvoid
# SetGravity
C#
public void SetGravity(Vector2 gravity);
Parameters
NameTypeDefault
gravityVector2—
SetJiggleDataChainLengthvoid
# SetJiggleDataChainLength
C#
public void SetJiggleDataChainLength(int length);
Parameters
NameTypeDefault
lengthint—
SetJiggleJointBone2DEntityvoid
# SetJiggleJointBone2DEntity
C#
public void SetJiggleJointBone2DEntity(int jointIdx, EntityPath bone2DEntity);

Sets the Bone2D node assigned to the Jiggle joint at joint_idx.

Parameters
NameTypeDefault
jointIdxint—
bone2DEntityEntityPath—
SetJiggleJointBoneIndexvoid
# SetJiggleJointBoneIndex
C#
public void SetJiggleJointBoneIndex(int jointIdx, int boneIdx);

Sets the bone index, bone_idx, of the Jiggle joint at joint_idx. When possible, this will also update the bone2d_node of the Jiggle joint based on data provided by the linked skeleton.

Parameters
NameTypeDefault
jointIdxint—
boneIdxint—
SetJiggleJointDampingvoid
# SetJiggleJointDamping
C#
public void SetJiggleJointDamping(int jointIdx, float damping);

Sets the amount of damping of the Jiggle joint at joint_idx.

Parameters
NameTypeDefault
jointIdxint—
dampingfloat—
SetJiggleJointGravityvoid
# SetJiggleJointGravity
C#
public void SetJiggleJointGravity(int jointIdx, Vector2 gravity);

Sets the gravity vector of the Jiggle joint at joint_idx.

Parameters
NameTypeDefault
jointIdxint—
gravityVector2—
SetJiggleJointMassvoid
# SetJiggleJointMass
C#
public void SetJiggleJointMass(int jointIdx, float mass);

Sets the of mass of the Jiggle joint at joint_idx.

Parameters
NameTypeDefault
jointIdxint—
massfloat—
SetJiggleJointOverridevoid
# SetJiggleJointOverride
C#
public void SetJiggleJointOverride(int jointIdx, bool @override);

Sets whether the Jiggle joint at joint_idx should override the default Jiggle joint settings. Setting this to true will make the joint use its own settings rather than the default ones attached to the modification.

Parameters
NameTypeDefault
jointIdxint—
overridebool—
SetJiggleJointStiffnessvoid
# SetJiggleJointStiffness
C#
public void SetJiggleJointStiffness(int jointIdx, float stiffness);

Sets the of stiffness of the Jiggle joint at joint_idx.

Parameters
NameTypeDefault
jointIdxint—
stiffnessfloat—
SetJiggleJointUseGravityvoid
# SetJiggleJointUseGravity
C#
public void SetJiggleJointUseGravity(int jointIdx, bool useGravity);

Sets whether the Jiggle joint at joint_idx should use gravity.

Parameters
NameTypeDefault
jointIdxint—
useGravitybool—
SetMassvoid
# SetMass
C#
public void SetMass(float mass);
Parameters
NameTypeDefault
massfloat—
SetStiffnessvoid
# SetStiffness
C#
public void SetStiffness(float stiffness);
Parameters
NameTypeDefault
stiffnessfloat—
SetTargetEntityvoid
# SetTargetEntity
C#
public void SetTargetEntity(EntityPath targetEntitypath);
Parameters
NameTypeDefault
targetEntitypathEntityPath—
SetUseCollidersvoid
# SetUseColliders
C#
public void SetUseColliders(bool useColliders);

If true, the Jiggle modifier will take colliders into account, keeping them from entering into these collision objects.

Parameters
NameTypeDefault
useCollidersbool—
SetUseGravityvoid
# SetUseGravity
C#
public void SetUseGravity(bool useGravity);
Parameters
NameTypeDefault
useGravitybool—
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.