Animator Get IK Rotation#
Animation / Animator / Animator Get IK Rotation
Description#
Compares the Get IK Rotation method of Animator component to another value
Parameters#
| Name | Description |
|---|---|
| Animator | |
| Goal | |
| Value |
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 Get IK Rotation")]
[Category("Animation/Animator/Get IK Rotation")]
[Description("Compares the Get IK Rotation method of Animator component to another value")]
[Image(typeof(IconAnimator), ColorTheme.Type.Teal)]
[Keywords("Animation, Clip, Play, Animate")]
[Parameter("Animator")]
[Parameter("Goal")]
[Parameter("Value")]
[Serializable]
public class GenConditionQuaternion_Animator_CheckGetIKRotation_1 : Condition
{
[SerializeField] private GetGameObject m_Animator = new GetGameObject(
new GenTypeGameObject_Animator()
);
[SerializeField] private GetQuaternion m_Value = new GetQuaternion();
[SerializeField] private AvatarIKGoal m_Goal = default;
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Get IK Rotation");
string parameters = $"({this.m_Goal})";
return $"{this.m_Animator} {method} = {this.m_Value}";
}
protected override bool Run(Args args)
{
Animator component = this.m_Animator.Get<Animator>(args);
if (component == null) return false;
Quaternion value = component.GetIKRotation(
this.m_Goal
);
return value == (Quaternion) this.m_Value.Get(args);
}
}
}