0
你好我試圖讓這個碰撞過濾工作,但我感到有點卡住...碰撞器過濾器不工作
local bad1CollisionFilter1 = { categoryBits = 1, maskBits = 3 }
if (temp.imgpath == "BCloud1.png") then
physics.addBody(randomStar, { density=2.9, friction=0.5, bounce=0.3, radius=16, filter=bad1CollisionFilter1 })
end
local collision = function(bad1CollisionFilter1)
if bad1CollisionFilter1.phase == 'began' then
print("Hello i am CollisionFilter1")
end
end
任何幫助,得到這個工作表示讚賞!
你在哪裏添加碰撞事件監聽器? – hjpotter92 2013-03-09 19:27:33
運行時:removeEventListener(「bad1CollisionFilter1」,碰撞) – 2013-03-10 17:17:11