Grid-aligned Crates
Posted: Tue Aug 18, 2009 10:38 am
Hey guys!
I'm working on a game where there are Crates (boxes) and the Player should be able to push them around. However, they must be aligned to grid in XZ plane (move only by one unit, either on X or Z axis), but free to move in Y (gravity,slopes). This is for Sokoban style puzzles. The rest of the world is 'proper physics' though.
How could I acheive this? I already tried having a vertical slider attached to a kinematic object, but that didn't work perfectly, and I think there are better ways to do it so I decided to ask here.
I'm working on a game where there are Crates (boxes) and the Player should be able to push them around. However, they must be aligned to grid in XZ plane (move only by one unit, either on X or Z axis), but free to move in Y (gravity,slopes). This is for Sokoban style puzzles. The rest of the world is 'proper physics' though.
How could I acheive this? I already tried having a vertical slider attached to a kinematic object, but that didn't work perfectly, and I think there are better ways to do it so I decided to ask here.