Support Forum

Unity 2021.2 AssertionException and Look rotation viewing vector is zero

Hi Aron,

I got these logs in unity 2021.2.17 and 4.3.47 or 4.3.48, makes it impossible to play my prototype anymore. I didnt recognize these errors in unity 2021.1. Disabling “stop when destination is crowded” or changing some settings inside the rvo simulator (hard collisions or double buffering). didnt change anything. I dont know whats the problem here, but it seems like it has something to do with the rvo.

Have you any idea?

Log 1:
Look rotation viewing vector is zero
UnityEngine.Quaternion:LookRotation (UnityEngine.Vector3,UnityEngine.Vector3)
Pathfinding.AIBase:SimulateRotationTowards (UnityEngine.Vector2,single,single) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/AIBase.cs:694)
Pathfinding.RichAI:FinalMovement (UnityEngine.Vector3,single,single,single,UnityEngine.Vector3&,UnityEngine.Quaternion&) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/RichAI.cs:485)
Pathfinding.RichAI:TraverseFunnel (Pathfinding.RichFunnel,single,UnityEngine.Vector3&,UnityEngine.Quaternion&) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/RichAI.cs:452)
Pathfinding.RichAI:MovementUpdateInternal (single,UnityEngine.Vector3&,UnityEngine.Quaternion&) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/RichAI.cs:386)
Pathfinding.AIBase:MovementUpdate (single,UnityEngine.Vector3&,UnityEngine.Quaternion&) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/AIBase.cs:546)
Pathfinding.AIBase:OnUpdate (single) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/AIBase.cs:490)
Pathfinding.AIBase:OnUpdate (Pathfinding.AIBase[],int,Pathfinding.Util.BatchedEvents/Event) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/AIBase.cs:471)
Pathfinding.Util.BatchedEvents/<>c__DisplayClass14_0`1<Pathfinding.AIBase>:b__0 (object[],int,Pathfinding.Util.BatchedEvents/Event) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Utilities/BatchedEvents.cs:150)
Pathfinding.Util.BatchedEvents:DoEvent (Pathfinding.Util.BatchedEvents/Event) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Utilities/BatchedEvents.cs:172)
Pathfinding.Util.BatchedEvents:FixedUpdate () (at Library/PackageCache/com.arongranberg.astar@4.3.47/Utilities/BatchedEvents.cs:192)

Log2:
AssertionException: Assertion failure. Value was True
Expected: False
UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) (at <8b27195d2ee14da7b6fd1e5435850f80>:0)
UnityEngine.Assertions.Assert.IsFalse (System.Boolean condition, System.String message) (at <8b27195d2ee14da7b6fd1e5435850f80>:0)
UnityEngine.Assertions.Assert.IsFalse (System.Boolean condition) (at <8b27195d2ee14da7b6fd1e5435850f80>:0)
Pathfinding.RichFunnel.ClampToNavmesh (UnityEngine.Vector3 position) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/RichPath.cs:348)
Pathfinding.RichAI.ClampToNavmesh (UnityEngine.Vector3 position, System.Boolean& positionChanged) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/RichAI.cs:497)
Pathfinding.AIBase.FinalizePosition (UnityEngine.Vector3 nextPosition) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/AIBase.cs:781)
Pathfinding.AIBase.FinalizeMovement (UnityEngine.Vector3 nextPosition, UnityEngine.Quaternion nextRotation) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/AIBase.cs:742)
Pathfinding.AIBase.OnUpdate (System.Single dt) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/AIBase.cs:491)
Pathfinding.AIBase.OnUpdate (Pathfinding.AIBase[] components, System.Int32 count, Pathfinding.Util.BatchedEvents+Event ev) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Core/AI/AIBase.cs:471)
Pathfinding.Util.BatchedEvents+<>c__DisplayClass14_0`1[T].b__0 (System.Object[] objs, System.Int32 count, Pathfinding.Util.BatchedEvents+Event ev) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Utilities/BatchedEvents.cs:150)
Pathfinding.Util.BatchedEvents.DoEvent (Pathfinding.Util.BatchedEvents+Event eventType) (at Library/PackageCache/com.arongranberg.astar@4.3.47/Utilities/BatchedEvents.cs:172)
Pathfinding.Util.BatchedEvents.FixedUpdate () (at Library/PackageCache/com.arongranberg.astar@4.3.47/Utilities/BatchedEvents.cs:192)

@aron_granberg any idea?

Hi

It looks like your agent might have a NaN positions (that’s what the asserts check). Could you check the positions of your agents and see if they are perhaps being moved in a very weird way?