From da65aefbc57f3f32db7434a7607d9a1f8bc9a223 Mon Sep 17 00:00:00 2001 From: "DESKTOP-3DS2H05\\User" Date: Fri, 18 Dec 2020 17:52:24 +0000 Subject: [PATCH] Added UpdateRotation property to CustomNavMeshAgent --- Assets/CustomNavMesh/Scripts/CustomNavMeshAgent.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Assets/CustomNavMesh/Scripts/CustomNavMeshAgent.cs b/Assets/CustomNavMesh/Scripts/CustomNavMeshAgent.cs index ceaf830..1b4591f 100644 --- a/Assets/CustomNavMesh/Scripts/CustomNavMeshAgent.cs +++ b/Assets/CustomNavMesh/Scripts/CustomNavMeshAgent.cs @@ -218,6 +218,15 @@ public int AvoidancePriority set { m_AvoidancePriority = value; NavMeshAgent.avoidancePriority = value; onChange?.Invoke(); } } + /// + /// Should the agent update the transform orientation? + /// + public bool UpdateRotation + { + get { return NavMeshAgent.updateRotation; } + set { NavMeshAgent.updateRotation = value; } + } + [SerializeField] float m_TimeToBlock = 1.0f; /// /// Time in seconds needed for the hidden agent to switch from agent to obstacle,