Collision Problems, Filters, Dynamic, Kinematic, OH my!

So, I'm at my wits end... (yet again, my wit tends to end quite quickly)

I have a game with a world that has gravity. I have a floor. I have monsters that both walk and fly... but I have a problem now. (Yes, I've set up filters properly and both the walking and flying monster have the same filter)

The monsters that walk are bodyType = "dynamic." This allows them to move along the floor with no problem. It also allows collisions with weapons and player and explosions to work properly.

But the monsters that fly.. now that I'm baffled with.

If I set the monsters that fly to "dynamic" they fall straight into the floor. Ok, obviously, that makes sense and that's NOT what I want (unless you can show me how to make dynamic objects that don't fall with gravity), so I tried "static" but what I didn't realize is that "static" objects don't interact with other static objects and have rather limited set of things they interact with. Problem. So then I switched to "kinematic" thinking that would solve my problems.

It doesn't.

So kinematic gets me oh so close... my flying enemies look like they are flying, and they respond to weapons and they hit the player.. so far so good.

Problem. How do I handle explosions? How I've been doing it, and what works wonderfully with the dynamic ground walking enemies is I spawn an invisible circle of type "static" that has ".isSensor = true." I then destroy it after a moment and deal the damage to the monsters and set their force vectors.

But these .isSensor explosions don't seem to interact with the kinematic objects! So I tried turning them "dynamic" or "kinematic".. but it doesn't matter.. the isSensor flag makes it so that the explosion simply will not interact with the "kinematic" flying enemies.

If I remove the .isSensor, then all kinds of nastiness happens as the ground monsters end up getting pushed around by the invisible explosion object.

HELP!

views:1406 update:2011/12/2 15:07:10
corona forums © 2003-2011