Rigidbody Reset Inertia Tensor#
Physics 3D / Rigidbody / Rigidbody Reset Inertia Tensor
Description#
Executes the Reset Inertia Tensor method on the Rigidbody component
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 Reset Inertia Tensor")]
[Category("Physics 3D/Rigidbody/Reset Inertia Tensor")]
[Description("Executes the Reset Inertia Tensor method on the Rigidbody component")]
[Image(typeof(IconPhysics), ColorTheme.Type.Lime)]
[Keywords("Physics, 3D")]
[Serializable]
public class GenInstructionRigidbody_ResetInertiaTensor_0 : Instruction
{
[SerializeField] private GetGameObject m_Rigidbody = new GetGameObject(
new GenTypeGameObject_Rigidbody()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Reset Inertia Tensor");
return $"{this.m_Rigidbody} {method}";
}
protected override Awaitable Run(Args args)
{
Rigidbody component = this.m_Rigidbody.Get<Rigidbody>(args);
if (component == null) return Done;
component.ResetInertiaTensor();
return Done;
}
}
}