Articulation Body Snap Anchor To Closest Contact#
Physics 3D / Articulation Body / Articulation Body Snap Anchor To Closest Contact
Description#
Executes the Snap Anchor To Closest Contact method on the Articulation Body component
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("Articulation Body Snap Anchor To Closest Contact")]
[Category("Physics 3D/Articulation Body/Snap Anchor To Closest Contact")]
[Description("Executes the Snap Anchor To Closest Contact method on the Articulation Body component")]
[Image(typeof(IconPhysics), ColorTheme.Type.Lime, typeof(BadgeDot))]
[Keywords("Physics, 3D")]
[Serializable]
public class GenInstructionArticulationBody_SnapAnchorToClosestContact_0 : Instruction
{
[SerializeField] private GetGameObject m_ArticulationBody = new GetGameObject(
new GenTypeGameObject_ArticulationBody()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Snap Anchor To Closest Contact");
return $"{this.m_ArticulationBody} {method}";
}
protected override Awaitable Run(Args args)
{
ArticulationBody component = this.m_ArticulationBody.Get<ArticulationBody>(args);
if (component == null) return Done;
component.SnapAnchorToClosestContact();
return Done;
}
}
}