- Home /
How can I keep enemies that follow my Player, from becoming a "blob"?
I know the first way is using regular collision, but that comes with the problem that they come into a certain range, I have them orbiting my player. You can see the problem that regular collision causes there.
Regardless of what my enemies do once they get to me, I need a way to keep the enemies from "blobbing" up when following me. I thought maybe they could arrange themselves in a formation or something that keeps them from moving too unnaturally.
Answer by MFen · Oct 11, 2013 at 03:56 AM
Some choices that may work for you are:
1: The closest enemy becomes the parent gameObject and the rest that come within a range of the "leader" becomes a child and never changes range from the leader. Issues with this is that if the leader is a slower monster the followers are restricted by this.
2: Physics.SphereCast You could use sphereCast to check enemies around it and if it falls within a range bubble do not restrict the x or z axis from moving in on the player but continue towards the player.
3: Instead of collision use trigger boxes and use that as your collision vs. physics and manually change the positioning of the enemy.
I'm sure there are more ways but theres a couple I can think of off the top of my head.
Your answer
Follow this Question
Related Questions
How to make Enemies 3 Answers
Why is my enemy not doing his run animation? 1 Answer
enemies in my Range 1 Answer
Camera rotation around player while following. 6 Answers
Player and Enemy Collision Problem 0 Answers