Why/How 2d tower of blocks collapse?
Hi, Guys!
I have a game, where you grab boxes from left and right and you put them on top of each other. And it should be endless, if you put blocks absolutely correct. The problem is, that main core mechanic doesn't work. In prototypes which I have, any tower +25-30 boxes starts to collapse in few seconds after launch.
To fix this, I tried everything I found: put your own Physics2D material with different settings of friction and bounciness, I tried to change different RigidBody2D settings, transform collider or add more small colliders inside of one, played with unity physics setting. None of this did any result..
The point is, I can't put blocks to be kinematic neither to freeze rotations or change any physics settings, which will effect on boxes falling or rotation speed. And yes, I used supporting colliders from both sides, but it doesn't fit in my game
So, cmon unity, can I build tower of single blocks without developing new physics engine please?
I worked on this game for 1.5 month, so yeah, I tried different ways of building tower. Pictures are just an example of how I test these things and have nothing to do with the real project.. (It's actually dead right now because of transition between unity 5.1.1 and 5.3.1)
A search on "Physics Engine Stack Blocks" shows that this is just a tricky problem, and Physics Engines tend to be bad at it. For a normal project, you try to guess the tough parts and make a quick demo (like 15 $$anonymous$$utes to build a 20-block tower and watch the results.) Live and learn.
I solved a version of this using is$$anonymous$$enimatic and OnCollision, but that requires some familiarity with Unity and a chunk of program$$anonymous$$g.