Roll a ball enemy won't get too close

So for what ever reason the enemy from the roll a ball tutorial will fallow the player but keeps it’s distance after getting close and won’t actually tounch the ball, any idea how to fix it

I just put the script and/or nav mesh agent in the wrong spot

Hello! I encountered the same problem with my Roll-A-Ball project. The enemy seemed to “orbit” the player instead of chasing them.

In my case, the issue was that I hadn’t reset the transform on the EnemyBody child gameobject, so the visible EnemyBody was not at the same location as the actual Enemy which was pursing the player. The solution was simply to reset the transform on the EnemyBody and reposition the Enemy to the correct location.

A good takeaway here is: always make sure you’re moving the whole parent gameobject and not just one of its children.

1 Like