Physics with Box2D in a top-down game?

Hey guys
I’ve been wondering lately about making a top-down game and one of the things I don’t want to happen is for movement and things like that to be limited to just tiles (although the world can be). I would also like to know whether it’s possible to have:

  • movable objects
  • car physics
  • worlds with depth (not just a flat surface).
    I have seen resources on car physics in a top-down game with Box2D, but I’m stumped as to how I’d implement worlds with depth. If I had a body for each tile, and players and whatnot, they’d collide with any tile in the world, regardless of “z-order”, wouldn’t they? Would Box2D support only colliding with things above a certain z-order, or would I have to implement this myself?
    Any resources/links/ideas would be great. Tell me if I need to explain anything in addition to what I’ve mentioned, but I think I’ve covered everything.
    Thanks!

Bo2D has collision filtering.

You can change collision filters on the go, so you can have the player change what layer he is on and what he can collide with.

Have a look at this Collision filtering

Wow, that helps a lot! I was looking on that site yesterday and I didn’t even think to look at that page. Thank you.