Animator Set IK Rotation#
Animation / Animator / Animator Set IK Rotation
Description#
Executes the Set IK Rotation method on the Animator component
Parameters#
| Name | Description |
|---|---|
| Goal | |
| Goal Rotation |
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 Rotation")]
[Category("Animation/Animator/Set IK Rotation")]
[Description("Executes the Set IK Rotation method on the Animator component")]
[Image(typeof(IconAnimator), ColorTheme.Type.Teal)]
[Keywords("Animation, Clip, Play, Animate")]
[Parameter("Goal")]
[Parameter("Goal Rotation")]
[Serializable]
public class GenInstructionAnimator_SetIKRotation_2 : Instruction
{
[SerializeField] private GetGameObject m_Animator = new GetGameObject(
new GenTypeGameObject_Animator()
);
[SerializeField] private AvatarIKGoal m_Goal = default;
[SerializeField] private GetQuaternion m_GoalRotation = new GetQuaternion();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Set IK Rotation");
return $"{this.m_Animator} {method} ({this.m_Goal}, {this.m_GoalRotation})";
}
protected override Awaitable Run(Args args)
{
Animator component = this.m_Animator.Get<Animator>(args);
if (component == null) return Done;
component.SetIKRotation(
this.m_Goal,
(Quaternion) this.m_GoalRotation.Get(args)
);
return Done;
}
}
}