Colision with circle

Official forum for the Chipmunk2D Physics Library.
Post Reply
Vadim
Posts: 6
Joined: Thu Aug 26, 2010 6:00 am
Contact:

Colision with circle

Post by Vadim »

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?
:?:
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Colision with circle

Post by slembcke »

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.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Vadim
Posts: 6
Joined: Thu Aug 26, 2010 6:00 am
Contact:

Re: Colision with circle

Post by Vadim »

I have interaction, but when my circle object's interaction it doesn't call my function
begin() sometimes..........
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Colision with circle

Post by slembcke »

Vadim wrote:I have interaction, but when my circle object's interaction it doesn't call my function
begin() sometimes..........
Do you have the cpShape.collision_type type set up correctly?
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Vadim
Posts: 6
Joined: Thu Aug 26, 2010 6:00 am
Contact:

Re: Colision with circle

Post by Vadim »

Yes, if i change shape's of object's from Circle to Poly all works well....
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 15 guests