non Physics collision? other forms of collision

Hi everyone!
i have been using physics for my collisions. They have worked great until now. i need to check collision between two kinematic objects but
it looks like you cant collide 2 kinematic objects.

  • is there a way to avoid using physics for collision?
  • will this hinder performance?

thanks for any help! looking forward to your answers
PS: been searching the forums found a flag isSensor but that hasn’t helped me.

[import]uid: 99036 topic_id: 23087 reply_id: 323087[/import]

As of now (I hope this isn’t show-stopping for you), I don’t believe there’s any way to sense collision between 2 “kinematic” objects. This might be a Box2D limitation more than a Corona limitation, I’m not sure.

If it’s possible in your app, try to use dynamic objects whenever possible, setting them as sensors if you don’t want them to physically collide/bounce. Of course, if you’re using gravity then this usually isn’t possible (the point of “kinematic” is that they don’t respond to gravity and similar forces). If you’re NOT using gravity, then it should be possible to make most bodies, or all, into dynamic bodies so they always sense collision (or at least one of the two colliding must be dynamic, the other can be kinematic).

The good news is, “improved physics” has been on the Ansca priority list for some time. I think this includes collision of non-physical objects, but who knows anymore, it’s been on the list for months. Hopefully now that the massive graphics/sprites overhaul has been put into motion, a key priority for Ansca is the physics system. Many developers have been begging this for a LONG time. :slight_smile:

Brent Sorrentino
Ignis Design
[import]uid: 9747 topic_id: 23087 reply_id: 92316[/import]

What I have been doing at the moment is welding invisible dynamic objects to my kinematic objects with weld joints.
Then detecting the collision between the dynamic objects instead.

A distance joint would also suffice and serve just as well.

edit : and +1 on the physics sorely needing an update. It is by far one of the weakest points of this SDK at the moment. All of the problems I have come up against so far have all been physics related and have only been solved via workarounds (all of which have literally doubled the time required for my workflow now). [import]uid: 118687 topic_id: 23087 reply_id: 92318[/import]

wow guys thanks to both of you.

@IgnisDesign im excited for the new sprite system/performance i think i can make a game i was thinking about but needed lots of sprites on screen. going to test that out soon

@matttai that solution sounds great ill certainly try that out!

thanks again!
[import]uid: 99036 topic_id: 23087 reply_id: 92381[/import]