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