View Full Version : Make certain object not collide with a tilepic.

05-09-2010, 04:34 AM
I made the map walls of tilepics...

But I want powerups NOT collide with them (specially, because that breaks the gameplay, when a powerup get stuck out of reach...)

But I cannot figure how to do it... It is possible, or I will have to do C++ hacking?

05-10-2010, 01:29 AM
Hmm.. tilepics are always set as category "C_CATEGORY_TILEPIC ", as far as the collision stuff is concerned.

I suppose it wouldn't be a big deal to allow this to be editable on a per-tilepic basis from the editor... Box2D allows 16 'bitmasks', you can see how I've defined the first 8 in setup_constants.lua.

If I know more about what your goal is I might be able to think of a way to do it.

One possible solution is make your power-ups Entities and set them not to collide with tilepics, but have your 'walls' made of Entities, so they can still bounce off those.