---
tags:
    - "Navigation, NavMesh, AI, Carve, Block"
---

# Nav Mesh Obstacle Velocity

[Navigation](../index.md) / [Nav Mesh Obstacle](index.md) / **Nav Mesh Obstacle Velocity**

## Description

Compares the Velocity property of Nav Mesh Obstacle component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Nav Mesh Obstacle |  |
| 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;
using UnityEngine.AI;

namespace VisualScript.Runtime
{
    [Title("Nav Mesh Obstacle Velocity")]
    [Category("Navigation/Nav Mesh Obstacle/Velocity")]
    [Description("Compares the Velocity property of Nav Mesh Obstacle component to another value")]

    [Image(typeof(IconNavmeshObstacle), ColorTheme.Type.Red)]
    [Keywords("Navigation, NavMesh, AI, Carve, Block")]

    [Parameter("Nav Mesh Obstacle")]
    [Parameter("Value")]

    [Serializable]
    public class GenConditionVector3_NavMeshObstacle_CheckVelocity : Condition
    {
        [SerializeField] private GetGameObject m_NavMeshObstacle = new GetGameObject(
            new GenTypeGameObject_NavMeshObstacle()
        );

        [SerializeField] private GetVector3 m_Value = new GetVector3();

        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Velocity");
            return $"{this.m_NavMeshObstacle} {member} = {this.m_Value}";
        }

        protected override bool Run(Args args)
        {
            NavMeshObstacle component = this.m_NavMeshObstacle.Get<NavMeshObstacle>(args);
            if (component == null) return false;

            return component.velocity == (Vector3) this.m_Value.Get(args);
        }
    }
}
```

