---
tags:
    - "Physics, 3D"
---

# Set Rigidbody Automatic Inertia Tensor

[Physics 3D](../index.md) / [Rigidbody](index.md) / **Set Rigidbody Automatic Inertia Tensor**

## Description

Sets the Automatic Inertia Tensor property of Rigidbody component

## Parameters

| Name | Description |
| :--- | :---------- |
| Rigidbody |  |
| Value |  |

## Code

```cs
// <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("Set Rigidbody Automatic Inertia Tensor")]
    [Category("Physics 3D/Rigidbody/Automatic Inertia Tensor")]
    [Description("Sets the Automatic Inertia Tensor property of Rigidbody component")]
    
    [Image(typeof(IconPhysics), ColorTheme.Type.Lime)]
    [Keywords("Physics, 3D")]
    
    [Parameter("Rigidbody")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenInstructionBool_Rigidbody_SetAutomaticInertiaTensor : Instruction
    {
        [SerializeField] private GetGameObject m_Rigidbody = new GetGameObject(
            new GenTypeGameObject_Rigidbody()
        );
        
        [SerializeField] private GetBool m_Value = new GetBool();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Automatic Inertia Tensor");
            return $"{this.m_Rigidbody} {member} = {this.m_Value}";
        }
        
        protected override Awaitable Run(Args args)
        {
            Rigidbody component = this.m_Rigidbody.Get<Rigidbody>(args);
            if (component == null) return Done;
            
            component.automaticInertiaTensor = (bool) this.m_Value.Get(args);
            
            return Done;
        }
    }
}


```

