Forum rules - please read before posting.

NPCs walk slowly when vsync is on

I upgraded my Unity to version 2022.3.18f1 from version 2021.3.33f1 due to a strange camera preview bug, which was fixed after the update. However, now all npcs walk incredibly slowly when vsync is turned on, while everything else runs as normal. AC version is 1.79.3

Comments

  • edited January 22

    Is it still like this when you cap the framerate at e.g. 60 FPS?
    FPS can influence movement and physics. I don't know if it has anything to do with AC, but try limiting it first.

    https://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html

  • edited January 22

    It seems like this only happens with NPCs that are sprite-based. (My game world is 3D) The problem also occurs on a new project and only on the newer unity version. On the fresh project vsync made no difference, the sprite npc would always move very slow and laggy.

  • It may be a Unity issue, if it's version dependent.

    What is your AC version? I'll attempt a recreation.

  • AC v1.79.3

  • I can't reproduce such an issue. Can you share a screenshot of a typical NPC's full Inspector, and are you seeing related spikes in the Profiler?

  • I figured that "Retro-style movement" is causing the movement to break like that. Taking that off caused some issues with characters getting stuck on path nodes, but then turning on the "turn root object in 3D" helped with that. I would also turn on the is kinematic or the player would be able to push the characters around.


  • Try removing the Rigidbody and Collider components - the retro-mode option is intended for 2D characters, and they aren't strictly necessary if a character is only moved through pathfinding.

  • Yeah, that works. Interesting that it worked fine on previous Unity versions.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.