Found a lot of physic engines out there but nothing that fit my needs directly. I try to to find a simple way to push and pull boxes including collision detection which respects the next neighboring mesh hit while moving.
Some use cases to understand:
All boxes except box 1 are moveable.
Push or Pull box 4 to west:
- Should move box 3 to west on collision.
- Should make box 3 and 4 not able to move west when box 3 hits box 2.
Push 2, 3 or 4 to north:
- Should stop when it hits box 2, because box 1 is not movable.
it should not possible to push or pull 2 colliding boxes with a box.
Maybe not the best question... I could write such a logic from scratch but this would end in fairly complex code :) and I wonder if nobody solved something like that before. Does there exist an easy way to implement such a logic using an existing physic engine or a three.js plugin?
Hope the question is formulated well enough so that anyone can understand it. Maybe easier If you know the famous boulder dash game.
Possible to move both rocks in both directions.
Impossible to move a rock.
In my case it should be possible to move 2 colliding rocks/cubes but not 3.