Articulation Body Get Relative Point Velocity#
Physics 3D / Articulation Body / Articulation Body Get Relative Point Velocity
Description#
Compares the Get Relative Point Velocity method of Articulation Body component to another value
Parameters#
| Name | Description |
|---|---|
| Articulation Body | |
| Relative Point | |
| 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 Get Relative Point Velocity")]
[Category("Physics 3D/Articulation Body/Get Relative Point Velocity")]
[Description("Compares the Get Relative Point Velocity method of Articulation Body component to another value")]
[Image(typeof(IconPhysics), ColorTheme.Type.Lime, typeof(BadgeDot))]
[Keywords("Physics, 3D")]
[Parameter("Articulation Body")]
[Parameter("Relative Point")]
[Parameter("Value")]
[Serializable]
public class GenConditionVector3_ArticulationBody_CheckGetRelativePointVelocity_1 : Condition
{
[SerializeField] private GetGameObject m_ArticulationBody = new GetGameObject(
new GenTypeGameObject_ArticulationBody()
);
[SerializeField] private GetVector3 m_Value = new GetVector3();
[SerializeField] private GetVector3 m_RelativePoint = new GetVector3();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Get Relative Point Velocity");
string parameters = $"({this.m_RelativePoint})";
return $"{this.m_ArticulationBody} {method} = {this.m_Value}";
}
protected override bool Run(Args args)
{
ArticulationBody component = this.m_ArticulationBody.Get<ArticulationBody>(args);
if (component == null) return false;
Vector3 value = component.GetRelativePointVelocity(
(Vector3) this.m_RelativePoint.Get(args)
);
return value == (Vector3) this.m_Value.Get(args);
}
}
}