Adventure Creator 1.84.3
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2024
Loading...
Searching...
No Matches
AC.IKCommand Class Reference

Public Member Functions

 IKCommand (Transform _targetTransform, AnimationCurve _transitionCurve, bool onInstantly)
void Update (float deltaTime)
 Updates the command's transition.
void OnAnimatorIK (Animator animator, AvatarIKGoal avatarIKGoal, IKCommand otherCommand=null)
 Applies the command's effect on an Animator.
void Deactivate (AnimationCurve deactivationCurve=null)
 Deactivates the command's effect.
bool HasTarget (Transform transform)
 Checks if the command refers to a given target transform.
string GetSaveData ()

Static Public Member Functions

static IKCommand LoadData (string data)

Properties

bool IsReadyToDestroy [get]
bool IsActive [get]
bool IsInTransition [get]

Detailed Description

This stores information about an active IK limb command.

Constructor & Destructor Documentation

◆ IKCommand()

AC.IKCommand.IKCommand ( Transform _targetTransform,
AnimationCurve _transitionCurve,
bool onInstantly )

The default Constructor

Member Function Documentation

◆ Deactivate()

void AC.IKCommand.Deactivate ( AnimationCurve deactivationCurve = null)

Deactivates the command's effect.

Parameters
deactivationCurveIf set, the effect's transition data will be replaced by this

◆ GetSaveData()

string AC.IKCommand.GetSaveData ( )

Serializes data about the command into a single string

◆ HasTarget()

bool AC.IKCommand.HasTarget ( Transform transform)

Checks if the command refers to a given target transform.

Parameters
transformThe transform to check for
Returns
True if the command refers to the transform

◆ LoadData()

IKCommand AC.IKCommand.LoadData ( string data)
static

Creates a new instance of the class from string data

◆ OnAnimatorIK()

void AC.IKCommand.OnAnimatorIK ( Animator animator,
AvatarIKGoal avatarIKGoal,
IKCommand otherCommand = null )

Applies the command's effect on an Animator.

Parameters
animatorThe Animator to control
avatarIKGoalThe AvatarIKGoal to control
otherCommandIf set, the combined effects will be weight-blended together

◆ Update()

void AC.IKCommand.Update ( float deltaTime)

Updates the command's transition.

Parameters
deltaTimeThe Time.deltaTime value this frame

Property Documentation

◆ IsActive

bool AC.IKCommand.IsActive
get

True if the command is active

◆ IsInTransition

bool AC.IKCommand.IsInTransition
get

True if the command is currently in transition

◆ IsReadyToDestroy

bool AC.IKCommand.IsReadyToDestroy
get

True if the command is no longer having an effect