Set Hinge Joint Use Acceleration#
Physics 3D / Joint / Hinge Joint / Set Hinge Joint Use Acceleration
Description#
Sets the Use Acceleration property of Hinge Joint component
Parameters#
| Name | Description |
|---|---|
| Hinge Joint | |
| 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("Set Hinge Joint Use Acceleration")]
[Category("Physics 3D/Joint/Hinge Joint/Use Acceleration")]
[Description("Sets the Use Acceleration property of Hinge Joint component")]
[Image(typeof(IconHinge), ColorTheme.Type.Lime)]
[Keywords("Physics, 3D")]
[Parameter("Hinge Joint")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_HingeJoint_SetUseAcceleration : Instruction
{
[SerializeField] private GetGameObject m_HingeJoint = new GetGameObject(
new GenTypeGameObject_HingeJoint()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Use Acceleration");
return $"{this.m_HingeJoint} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
HingeJoint component = this.m_HingeJoint.Get<HingeJoint>(args);
if (component == null) return Done;
component.useAcceleration = (bool) this.m_Value.Get(args);
return Done;
}
}
}