reckfellENGINE

SkeletonModification2DLookAt

A modification that rotates a Bone2D node to look at a target.

On this page
class SkeletonModification2DLookAtReckfellSharpInherits SkeletonModification2D

A modification that rotates a Bone2D node to look at a target.

This SkeletonModification2D rotates a bone to look a target. This is extremely helpful for moving character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily.

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

Constructors1

SkeletonModification2DLookAtConstructor
# SkeletonModification2DLookAt
C#
public SkeletonModification2DLookAt();

Properties3

Bone2DEntityProperty
# Bone2DEntity
C#
public EntityPath Bone2DEntity { get; set; }

The Bone2D node that the modification will operate on.

BoneIndexProperty
# BoneIndex
C#
public int BoneIndex { get; set; }

The index of the Bone2D node that the modification will operate on.

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

The EntityPath to the node that is the target for the LookAt modification. This node is what the modification will rotate the Bone2D to.

Methods16

GetAdditionalRotationfloat
# GetAdditionalRotation
C#
public float GetAdditionalRotation();

Returns the amount of additional rotation that is applied after the LookAt modification executes.

Returns float
GetBone2DEntityEntityPath
# GetBone2DEntity
C#
public EntityPath GetBone2DEntity();
Returns EntityPath
GetBoneIndexint
# GetBoneIndex
C#
public int GetBoneIndex();
Returns int
GetConstraintAngleInvertbool
# GetConstraintAngleInvert
C#
public bool GetConstraintAngleInvert();

Returns whether the constraints to this modification are inverted or not.

Returns bool
GetConstraintAngleMaxfloat
# GetConstraintAngleMax
C#
public float GetConstraintAngleMax();

Returns the constraint's maximum allowed angle.

Returns float
GetConstraintAngleMinfloat
# GetConstraintAngleMin
C#
public float GetConstraintAngleMin();

Returns the constraint's minimum allowed angle.

Returns float
GetEnableConstraintbool
# GetEnableConstraint
C#
public bool GetEnableConstraint();

Returns true if the LookAt modification is using constraints.

Returns bool
GetTargetEntityEntityPath
# GetTargetEntity
C#
public EntityPath GetTargetEntity();
Returns EntityPath
SetAdditionalRotationvoid
# SetAdditionalRotation
C#
public void SetAdditionalRotation(float rotation);

Sets the amount of additional rotation that is to be applied after executing the modification. This allows for offsetting the results by the inputted rotation amount.

Parameters
NameTypeDefault
rotationfloat—
SetBone2DEntityvoid
# SetBone2DEntity
C#
public void SetBone2DEntity(EntityPath bone2DEntitypath);
Parameters
NameTypeDefault
bone2DEntitypathEntityPath—
SetBoneIndexvoid
# SetBoneIndex
C#
public void SetBoneIndex(int boneIdx);
Parameters
NameTypeDefault
boneIdxint—
SetConstraintAngleInvertvoid
# SetConstraintAngleInvert
C#
public void SetConstraintAngleInvert(bool invert);

When true, the modification will use an inverted joint constraint. An inverted joint constraint only constraints the Bone2D to the angles outside of the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values.

Parameters
NameTypeDefault
invertbool—
SetConstraintAngleMaxvoid
# SetConstraintAngleMax
C#
public void SetConstraintAngleMax(float angleMax);

Sets the constraint's maximum allowed angle.

Parameters
NameTypeDefault
angleMaxfloat—
SetConstraintAngleMinvoid
# SetConstraintAngleMin
C#
public void SetConstraintAngleMin(float angleMin);

Sets the constraint's minimum allowed angle.

Parameters
NameTypeDefault
angleMinfloat—
SetEnableConstraintvoid
# SetEnableConstraint
C#
public void SetEnableConstraint(bool enableConstraint);

Sets whether this modification will use constraints or not. When true, constraints will be applied when solving the LookAt modification.

Parameters
NameTypeDefault
enableConstraintbool—
SetTargetEntityvoid
# SetTargetEntity
C#
public void SetTargetEntity(EntityPath targetEntitypath);
Parameters
NameTypeDefault
targetEntitypathEntityPath—
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.