CollisionManager Callbacks not working?

Chipmunk2D Bindings for the Unity3D engine
Post Reply
David Kalina
Posts: 24
Joined: Thu Sep 09, 2010 10:22 am
Contact:

CollisionManager Callbacks not working?

Post by David Kalina »

Either I'm missing something or perhaps this is a dupe of an already-known issue (looks like there are similar problems being reported ATM).

I'm simply trying to get collision callbacks between two objects.

One is the player - a kinematic body attached to a non-sensor shape. The player's collision type is "spider".
The other is an AI - a kinematic body attached to a sensor shape. The AI's collision type is "insect".

I subclass ChipmunkCollisionManager and add it to my player as a component.

Inside that class I write the function:

Code: Select all

	bool ChipmunkBegin_spider_insect(ChipmunkArbiter arbiter)
	{
		print("  BANG ");
		return true;
	}
I drive the player around using our game's input system and make the player touch the AI... and nothing happens.

If I make the insect/AI body a non-kinematic-body with a non-sensor shape, I'll get a callback ONLY if the AI touches the player first (and then, only once). Otherwise if the insect touches the world geometry, and then the Spider touches the AI, I never get a callback.

Thanks in advance!
David
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: CollisionManager Callbacks not working?

Post by slembcke »

Oof. Another isKinematic bug it sounds like. I'll look at this tonight and see how deep the rabbit hole is. Hopefully there is something simple going on.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
runonthespot
Posts: 8
Joined: Fri Aug 16, 2013 10:42 am
Contact:

Re: CollisionManager Callbacks not working?

Post by runonthespot »

Unfortunately I'm experiencing issues getting collision callbacks to work between a sensor and non-sensor type.

Look forward to hearing progress with this bug- hopefully it will fix my issue too.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: CollisionManager Callbacks not working?

Post by slembcke »

Should be fixed in 1.0.3 that was released yesterday. Available if you bought it from the website here:
http://chipmunk-physics.net/downloads.php

Might take a couple days for the new version to show up on the Asset Store.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests