Search Unity

What is synchronizeSimulationToAgentTransforms?

Discussion in 'Navigation' started by radiantboy, Jun 21, 2021.

  1. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    I am tring to move some npcs in a less expensive way when offscreen. So I use NavMesh.CalculatePath to calc a path (rather than setDestination), then manually move along it using lerp to go between the corners of the path. When I do this I see a lot of synchronizeSimulationToAgentTransforms calls really lowering performance. What is it doing ? How to avoid it?

    One thing that is weird is NavMesh.CalculatePath STILL needs my navmeshAgent turned on to work (ive seen unity employees say that isnt the case, so maybe im doing something odd). I believe maybe my movement is fighting with the navAgents movement, giving them a jittery effect and may be causing the synchronizeSimulationToAgentTransforms issue but I cannot be sure.

    Anyone know how to make NavMesh.CalculatePath work without a navagent on, which is seemingly meant to be possible?
     
  2. bonickhausen

    bonickhausen

    Joined:
    Jan 20, 2014
    Posts:
    115
    Hi! This is a good question. What is this and how can we avoid this?