playMaker

Author Topic: NavMeshAgentMoveTo from ecosystem possible bug?  (Read 615 times)

Twood

  • Junior Playmaker
  • **
  • Posts: 76
NavMeshAgentMoveTo from ecosystem possible bug?
« on: September 20, 2021, 02:12:29 PM »
Found this on the ecosystem and looks good, however messing around testing some paths it seems like it has a game breaking bug in it. (Using Unity 2021.1.7f1 and PM 1.9.1)

So any time this action is used in any sort of state loop in playmaker, it breaks on returning to the start. Gives a loop exceeded warning and the movement doesn't work. Yet you can use it as many times as you want if you don't loop to the start...

I have other forms of moving the navmesh agent working in fsms fine, so it seems related to this action only.

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: NavMeshAgentMoveTo from ecosystem possible bug?
« Reply #1 on: November 27, 2022, 10:51:27 PM »
Just found this topic from 2022! Yeah, the bug is really there  ;D

edit. I assume the bug happens because the action didn't update/clear position values. Even if actual values are different, the action will use some cached values from the previous iteration. Quick fix is to comment this part
Code: [Select]
if(prevTargetPos == tPos) return; but a good solution must be, probably, some kind of reset on enter
« Last Edit: November 27, 2022, 10:58:41 PM by nFighter »
indie developer of multiplayer adult fighting
http://nakedfighter3d.com