Home > Blockchain >  How to make objects move like in Count Masters? Unity
How to make objects move like in Count Masters? Unity

Time:06-29

How to make objects move like in Count Masters?

Here is the picture:

enter image description here

I thought and tried for a long time, but the objects sometimes stick together into an incomprehensible mess, or fly away under pressure to distant distances.

Help please :D

CodePudding user response:

"stick together into an incomprehensible mess, or fly away under pressure" this sounds like you are using physics (also know as Rigidbody :p) with these avatars, so this behaviour is expected when a lot of rigidbodies are trying to go to a same spot, hitting each other.

I would suggest you to have, as @BugFiner suggest, a key minion who is the one who will drive the movement, got player input and move, and the other ones would be just transforms with mesh renderers following the main minion, applying some offset on their positions.

Wait, but this means that i wont have collision? With this solution, the enemy groups might just pass by the "dumb" minions and count collision only when they touch the main player minion.

I Would suggest a collider in the main minion (sphere for example) that grows as the horde grows too, and decrease in size as the horde decrease as well.

To check what horder gonna win, just check the player minions count against the enemy group, and them start do "unspawn" or "spawn" players minions.

  • Related