Hi! How do i merge two or more character in a minimal game?
So, im working in 2d and im trying to merge 3 spawned object (in this case are like 3 ball) into a big one when they are very close to each one... Im not sure if im clear , i would like to merge object like if it was a top down wargame where 2 or more soldiers form a platoon (that i see ingame like an icon with the count of the soldier inside without destroy them because if a need them in an other position the platoon itself is destroyed )... Can you help me? I haven' t got a single idea how to do that
Answer by Trigary · Jan 29, 2016 at 04:58 PM
Add bigger trigger colliders to the balls, if a ball detects (onTriggerEnter2D) another ball, move towards it, or something like that. If their actual hitboxes collide, delete those balls and create another ball from a prefab ("instantiate"). I'm not sure how to check how many balls collide with a ball at the same time, but I hope I gave you an idea how to do it :)
Your answer
![](https://koobas.hobune.stream/wayback/20220612062043im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Is there any way to trigger a popUp UI when a player steps in a specific set of tiles? 0 Answers
How do I make it so that two player controlled objects of varying speeds stay close to each other? 0 Answers
2D topdown RPG shooting in facing direction 0 Answers
New user question about 2D top down game and collision. 0 Answers