GreedyVox
Active member
Hi Justin,
Needing help with warping a NavMeshAgent, first I will try and explain the situation, I have a server and client project with a procedural terrain using NavMeshComponents and baking the terrain chunks in real-time, on the server host, every agent spawning and working correctly doing their own thing, on the clients side when agents spawn they are stuck.
Before spawning agents on the server or clients, the location is sample for a correct position on the NavMeshSurface, this isn't such a biggie cause planning on warping agents to sync with the server, but that is also a problem, after warping an agent to a sampled sync point, will cause the UltimateCharacterLocomotion to reset the agent back to the previous point, but when using the SetPositionAndRotation will fix the agent from returning to the previous point, however the agent is stuck, have tests the agent warping on the server, with having the same results too.
Things that have seem to unstuck an agent, is by attacking or bumping a agent from its position, have also tried many other tests such as updatePosition, isStopped and disable components before warping an agent. Disabling the UltimateCharacterLocomotion on an agent through unity inspector when stuck, will show the agent gizmo walking around correctly to it's destination, while the agent prefab is stationary, after enabling the UltimateCharacterLocomotion again, the agent gizmo is sent straight back to the agent prefab location where it will remain stuck in place.
Hope this is explanation paints a good picture of the issues I'm having, have you any ideas how to fix? Included screenshots, the capsules are syncing points and agent destinations with arrows displaying the path, also the skeleton is walking on the spot and not moving.
Thanks mate, appreciate all your help!
Needing help with warping a NavMeshAgent, first I will try and explain the situation, I have a server and client project with a procedural terrain using NavMeshComponents and baking the terrain chunks in real-time, on the server host, every agent spawning and working correctly doing their own thing, on the clients side when agents spawn they are stuck.
Before spawning agents on the server or clients, the location is sample for a correct position on the NavMeshSurface, this isn't such a biggie cause planning on warping agents to sync with the server, but that is also a problem, after warping an agent to a sampled sync point, will cause the UltimateCharacterLocomotion to reset the agent back to the previous point, but when using the SetPositionAndRotation will fix the agent from returning to the previous point, however the agent is stuck, have tests the agent warping on the server, with having the same results too.
Things that have seem to unstuck an agent, is by attacking or bumping a agent from its position, have also tried many other tests such as updatePosition, isStopped and disable components before warping an agent. Disabling the UltimateCharacterLocomotion on an agent through unity inspector when stuck, will show the agent gizmo walking around correctly to it's destination, while the agent prefab is stationary, after enabling the UltimateCharacterLocomotion again, the agent gizmo is sent straight back to the agent prefab location where it will remain stuck in place.
Hope this is explanation paints a good picture of the issues I'm having, have you any ideas how to fix? Included screenshots, the capsules are syncing points and agent destinations with arrows displaying the path, also the skeleton is walking on the spot and not moving.
Thanks mate, appreciate all your help!