嗨,我正试图让这个碰撞过滤器工作,但我有点卡住了......
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
任何帮助使这项工作得到赞赏!