multiple calls to onCollision
by Scott Wilson-Billing · in iTorque 2D · 02/01/2010 (10:00 am) · 2 replies
Hi,
Is it possible for an object e.g. bullet to collide with another object e.g. alien more than once i.e. will I receive multiple calls to onCollision? The reason I ask is that my death function on the alien seem to (very occasionally) be called more than once by the same colliding object. Just wondered if it was a timing thing?
Is it possible for an object e.g. bullet to collide with another object e.g. alien more than once i.e. will I receive multiple calls to onCollision? The reason I ask is that my death function on the alien seem to (very occasionally) be called more than once by the same colliding object. Just wondered if it was a timing thing?
#2
02/02/2010 (5:52 am)
Thanks, I fixed it by setting my death flag as soon as the collision occurred and then tested the flag thereafter.
Associate Dave Calabrese
Cerulean Games