Rigidbody Angular Damping#
Physics 3D / Rigidbody / Rigidbody Angular Damping
Description#
Compares the Angular Damping property of Rigidbody component to another value
Parameters#
| Name | Description |
|---|---|
| Rigidbody | |
| Compare | |
| 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("Rigidbody Angular Damping")]
[Category("Physics 3D/Rigidbody/Angular Damping")]
[Description("Compares the Angular Damping property of Rigidbody component to another value")]
[Image(typeof(IconPhysics), ColorTheme.Type.Lime)]
[Keywords("Physics, 3D")]
[Parameter("Rigidbody")]
[Parameter("Compare")]
[Parameter("Value")]
[Serializable]
public class GenConditionNumber_Rigidbody_CheckAngularDamping : Condition
{
[SerializeField] private GetGameObject m_Rigidbody = new GetGameObject(
new GenTypeGameObject_Rigidbody()
);
[SerializeField] private CompareNumber m_Compare = new CompareNumber();
[SerializeField] private GetNumber m_Value = new GetNumber();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Angular Damping");
return $"{this.m_Rigidbody} {member} {this.m_Compare} {this.m_Value}";
}
protected override bool Run(Args args)
{
Rigidbody component = this.m_Rigidbody.Get<Rigidbody>(args);
if (component == null) return false;
return this.m_Compare.Compare(component.angularDamping, (float) this.m_Value.Get(args));
}
}
}