I'm trying to make a weirdo edition of PacMan and I need a quick way to .draw all the points (diamonds) across the whole map. My idea was to draw a point every x,y with a loop and then check which of those collide with a wall and delete them. The only problem is that I have no idea about how to get the Fixture of the walls. I used Tiled with STI lib and made an collidable Object Layer. I'm a noob and I don't know which information you need in order to help me, just tell me what you need to know. Thank you so much
function Coin.beginContact(a, b, collision)
for i,instance in ipairs(ActiveCoins) do
if a == instance.physics.fixture or b == instance.physics.fixture then
if a == Player.physics.fixture or b == Player.physics.fixture then
instance.toBeRemoved = true
return true
elseif a == map.layers.Solid or b == map.layers.Solid then
instance.toBeRemoved = true
return true
end
end
end
end
This is how I check collision between Player and Coins, in the elseif I tried to experiment in order to get the fixture of the walls, but nada.