Hi,
I’m trying to get collision working so that when my player comes within range of an enemy they will fire and respond.
I’m also trying to make sure that when my player collides with an enemy a collision occurs (for damage)
I’m setting up the enemy as:
physics.addBody( object, “static”, { density = 3.0, friction = 1.0, bounce = 0.1 } ) – real body of sprite
physics.addBody( object, { density = 1, friction = 0, bounce = 0, radius=300, isSensor = true} ) – radar circle
object.collision = onLocalCollision
object:addEventListener( “collision”, object )
It looks like you can only have one addBody listening at a time. Are there any tried and true ways to implement this?
Thanks for any help, Greg