Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

What is synchronizeSimulationToAgentTransforms?

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

  1. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,635
    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?