Rigidbody Solver Velocity Iterations#
Physics 3D / Rigidbody / Rigidbody Solver Velocity Iterations
Description#
Compares the Solver Velocity Iterations 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 Solver Velocity Iterations")]
[Category("Physics 3D/Rigidbody/Solver Velocity Iterations")]
[Description("Compares the Solver Velocity Iterations 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 GenConditionInteger_Rigidbody_CheckSolverVelocityIterations : Condition
{
[SerializeField] private GetGameObject m_Rigidbody = new GetGameObject(
new GenTypeGameObject_Rigidbody()
);
[SerializeField] private CompareNumber m_Compare = new CompareNumber();
[SerializeField] private GetInteger m_Value = new GetInteger();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Solver Velocity Iterations");
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.solverVelocityIterations, (int) this.m_Value.Get(args));
}
}
}