FollowerEntity script causes unit to fly in air at start

I attached the FollowerEntity script to my soldier and it causes him to fly up in the air as soon as I hit the play button. I know it is the FollowerEntity script because I did debugging and found that when I disable the FollowerEntity script the soldier does not move when I click start.

I actually restarted my project from scratch, so there are not many other variables here. I created a new project in unity 2022.3.30f1 and I created a (currently) flat terrain, imported just the soldier, and a simple script that tells him to walk to a rallypoint. I know its not my script because the soldier still flys when I disable it.

Ok I fixed it. The problem was the curved part of my capsule collider was underneath my soldier and the follower entity was pushing that up to the surface. If anyone else has this problem just set the capsule collider so the curved part is even with the surface.

1 Like