I want to detect the intersection of two objects (sprites) in my scene. I don't want the object geometric intersection to cause a collision between the bodies in the scene.
I've created PhysicalBody for both of my object shapes, but I can't find a way to detect the intersection without having both bodies hit each other on impact.
I'm using cocos2d-x 3+ with the default chipmunk engine,
The question is, how do I detect the intersection of elements without having them physically push each other when they intersect.
Detect intersection without causing bodies to collide
-
- Posts: 1
- Joined: Mon Jun 30, 2014 2:28 am
- Contact:
-
- Posts: 157
- Joined: Mon Aug 20, 2007 12:53 pm
- Location: London, UK
- Contact:
Re: Detect intersection without causing bodies to collide
Sounds like you've already got a collision handler callback set up for collisions between those two objects. If you return 0 from the handler, they won't collide but you can still run your own code.
Who is online
Users browsing this forum: No registered users and 3 guests