- Home /
Duplicate Question of http://answers.unity3d.com/questions/516001/detecting-a-string-of-collisions.html
Remove objects if 3 or more of them are colliding
Hello guys!
How can I destroy the cubes, if only 3 or more of them are colliding? ■■■ for example.
Well, you'll have to detect if 3 or more are connected in some way. For example, try to save a list of all objects a cube is colliding with at a given moment and then try to check if those cubes in the list are also colliding with something. (while making sure that you don't end up with a endless loop checking all cubes constantly)
Follow this Question
Related Questions
Cube with colliders ignores other colliders, why? 1 Answer
Distribute terrain in zones 3 Answers
Particle collider not working 0 Answers
Mesh Collider on a 2D mesh creating a 3D box? 0 Answers
Gameobject collision with Terrain C# 4 Answers