@GregBUG,howto do this such as box2d?
function Game:onBeginContact(event)
local fixtureA = event.fixtureA
local fixtureB = event.fixtureB
local bodyA = fixtureA:getBody()
local bodyB = fixtureB:getBody()
local spriteA = bodyA.sprite
local spriteB = bodyB.sprite
end |
Comments
in TNT Collision there is no a dispatch event...
you need to check in main loop for a collision between spriteA and spriteB
TNT Collision is a simple collision system... you need to keep track of your sprites and check for collision on every frame...
take a look at TNT Collision Examples.
www.tntengine.com