Physics Collisions

Hey everybody,

I’m currently making a small tetris game.
As you all should know, the blocks land on other blocks and stay there (see Google Images: “teris”).
I’m not sure how I’ll do this, but I wondered if I could do that using RigidBodyControls (wow!).

To be more specific:
Is there a way to be ‘notified’ by a physicscontrol that it colides with something?

Yes you have to add a PhysicsCollisionListener to the physics space.
But imo using a physics engine for a tetris game is really a bad idea, the logic behind these games is entirely based on the grid that represent the game field.

I agree. At the moment, I’m using an event that checks every tick if there’s something below the given block.

Using a 3D physics engine for 2D tetris is like using one of these:

To take your groceries home from the store.

Even a 2D physics engine would be overkill.

So, yeah, I agree… just do it the easy way.

3 Likes