Animator Set IK Position#
Animation / Animator / Animator Set IK Position
Description#
Executes the Set IK Position method on the Animator component
Parameters#
| Name | Description |
|---|---|
| Goal | |
| Goal Position |
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("Animator Set IK Position")]
[Category("Animation/Animator/Set IK Position")]
[Description("Executes the Set IK Position method on the Animator component")]
[Image(typeof(IconAnimator), ColorTheme.Type.Teal)]
[Keywords("Animation, Clip, Play, Animate")]
[Parameter("Goal")]
[Parameter("Goal Position")]
[Serializable]
public class GenInstructionAnimator_SetIKPosition_2 : Instruction
{
[SerializeField] private GetGameObject m_Animator = new GetGameObject(
new GenTypeGameObject_Animator()
);
[SerializeField] private AvatarIKGoal m_Goal = default;
[SerializeField] private GetVector3 m_GoalPosition = new GetVector3();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Set IK Position");
return $"{this.m_Animator} {method} ({this.m_Goal}, {this.m_GoalPosition})";
}
protected override Awaitable Run(Args args)
{
Animator component = this.m_Animator.Get<Animator>(args);
if (component == null) return Done;
component.SetIKPosition(
this.m_Goal,
(Vector3) this.m_GoalPosition.Get(args)
);
return Done;
}
}
}