Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
When two sprite contract, can dispatch a collision event in TNT collision? — Gideros Forum

When two sprite contract, can dispatch a collision event in TNT collision?

louislouis Member
edited January 2013 in General questions
@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

  • GregBUGGregBUG Guru
    Accepted Answer
    Hi @louis,
    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.
    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
Sign In or Register to comment.