Articulation Body Set Drive Target Velocity#
Physics 3D / Articulation Body / Articulation Body Set Drive Target Velocity
Description#
Executes the Set Drive Target Velocity method on the Articulation Body component
Parameters#
| Name | Description |
|---|---|
| Axis | |
| 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("Articulation Body Set Drive Target Velocity")]
[Category("Physics 3D/Articulation Body/Set Drive Target Velocity")]
[Description("Executes the Set Drive Target Velocity method on the Articulation Body component")]
[Image(typeof(IconPhysics), ColorTheme.Type.Lime, typeof(BadgeDot))]
[Keywords("Physics, 3D")]
[Parameter("Axis")]
[Parameter("Value")]
[Serializable]
public class GenInstructionArticulationBody_SetDriveTargetVelocity_2 : Instruction
{
[SerializeField] private GetGameObject m_ArticulationBody = new GetGameObject(
new GenTypeGameObject_ArticulationBody()
);
[SerializeField] private ArticulationDriveAxis m_Axis = default;
[SerializeField] private GetNumber m_Value = new GetNumber();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Set Drive Target Velocity");
return $"{this.m_ArticulationBody} {method} ({this.m_Axis}, {this.m_Value})";
}
protected override Awaitable Run(Args args)
{
ArticulationBody component = this.m_ArticulationBody.Get<ArticulationBody>(args);
if (component == null) return Done;
component.SetDriveTargetVelocity(
this.m_Axis,
(float) this.m_Value.Get(args)
);
return Done;
}
}
}