Hellow, I need some help with Colision's.
When I colision two object's with circle shape, my objects don't interact with each other, and don't call
function int begin(cpArbiter *arb, cpSpace *space, void *ignore), but when I change shape's of object's
with same property's each interaction work's well.
What do you think about it?
Colision with circle
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Colision with circle
You are probably filtering the collision by mistake.
A collision will not happen if:
shape_a.group != 0 && shape_a.group == shape_b.group
shape_a.layers & shape_b.layers == 0 (bitwise AND)
if your begin() or preSolve() callbacks return 0/false.
Make sure that you are returning a value from begin() and preSolve() or it will just return a random value.
A collision will not happen if:
shape_a.group != 0 && shape_a.group == shape_b.group
shape_a.layers & shape_b.layers == 0 (bitwise AND)
if your begin() or preSolve() callbacks return 0/false.
Make sure that you are returning a value from begin() and preSolve() or it will just return a random value.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 6
- Joined: Thu Aug 26, 2010 6:00 am
- Contact:
Re: Colision with circle
I have interaction, but when my circle object's interaction it doesn't call my function
begin() sometimes..........
begin() sometimes..........
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Colision with circle
Do you have the cpShape.collision_type type set up correctly?Vadim wrote:I have interaction, but when my circle object's interaction it doesn't call my function
begin() sometimes..........
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 6
- Joined: Thu Aug 26, 2010 6:00 am
- Contact:
Re: Colision with circle
Yes, if i change shape's of object's from Circle to Poly all works well....
Who is online
Users browsing this forum: Bing [Bot] and 6 guests