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

# Rigidbody Solver Velocity Iterations

[Physics 3D](../index.md) / [Rigidbody](index.md) / **Rigidbody Solver Velocity Iterations**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :green_circle: Can Write

</div>

## Description

The Solver Velocity Iterations property of the Rigidbody component

## 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
{
    [Get]
    [Set]
    
    [Title("Rigidbody Solver Velocity Iterations")]
    [Category("Physics 3D/Rigidbody/Solver Velocity Iterations")]
    [Description("The Solver Velocity Iterations property of the Rigidbody component")]
    
    [Image(typeof(IconPhysics), ColorTheme.Type.Lime)]
    [Keywords("Physics, 3D")]
    
    [Serializable]
    public class GenTypeInteger_Rigidbody_SolverVelocityIterations : TypeNumber
    {
        [SerializeField] private GetGameObject m_Rigidbody = new GetGameObject(
            new GenTypeGameObject_Rigidbody()
        );
        
        public override double GetPreview(GameObject source)
        {
            GameObject instance = this.m_Rigidbody.GetPreview(source);
            if (instance == null) return default;
            
            Rigidbody component = instance.GetComponent<Rigidbody>();
            return component != null ? component.solverVelocityIterations : default;
        }
        
        public override double Get(Args args)
        {
            Rigidbody instance = this.m_Rigidbody.Get<Rigidbody>(args);
            return instance != null
                ? instance.solverVelocityIterations
                : default;
        }
        
        public override void Set(double value, Args args)
        {
            Rigidbody component = this.m_Rigidbody.Get<Rigidbody>(args);
            if (component != null) component.solverVelocityIterations = (int) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_Rigidbody} Solver Velocity Iterations";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}


```

