NPCs falling over at end of path

  • A* version: 5.4.5
  • Unity version: 6.000.035f1

Hello!

I’m working on a little 3D exploration game. I have around 10 test NPCs using a modified Patrol script (have not messed with the patrol, only added state changes/animation to it) and an unmodified AILerp with a seeker component, I’m testing on a fairly flat ground with few obstacles.

I have a series of waypoint objects that have a sphere mesh renderer but no physical component.

When my NPCs get to their waypoint, they for some reason decide to rotate 90 degrees on the x axis. then when their switchtime comes they get up and behave normally. While they’re moving they are fine, as soon as they stop they faceplant.

This only seems to happen if the waypoints are “near” something else, including another waypoint. A couple of the waypoints function fine and all the NPCS interact with them as they should, I think maybe because they are not near anything else, but it’s a huge distance, I can’t create my whole scene like that.

I have tried adding and removing rigidbodies (default is a kinematic rigidbody with all axes frozen), removing meshes, changed every aStar setting I can find, none of it matters.

I’ve made a video showing the problem.

Any thoughts?

They got sleepy

Having just struggled with some animation stuff in my game, this strikes me as a possibility. Try removing the animation that they’re on when they fall over. This may be an issue with the animation itself. Do you see this on other units? Or other animations? I can’t tell much from this specific video clip.