Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
[Box2D] Create a collectable object like coins without bouncing — Gideros Forum

[Box2D] Create a collectable object like coins without bouncing

jeromegsqjeromegsq Member
edited June 2015 in General questions
Hello,

I try to make a body collectable like a coin.
I use this :
function Game:collision(e)
	local fixtureA = e.fixtureA
	local fixtureB = e.fixtureB
	local bodyA = fixtureA:getBody()
	local bodyB = fixtureB:getBody()
 
	if bodyA.type == "gasoil" and bodyB.type == "copter" then
		Timer.delayedCall(1, function()
			bodyA.class:removeFromParent()
			bodyA:setActive(false)
		end)
	end
end
But when my helicopter touch the gasoil body, it bounce a little.
How to fix this ?

Thank

Comments

Sign In or Register to comment.