I'm currently using a physics module called
windfield. I'm having trouble with collisions. Especially when two rectangle colliders are side by side on same surface. Player sometimes bumps into it as if it is a wall. Also collisions with wall when player is grounded is tricky. I wonder if there is a solution to this?
Code for creating colliders from Tiled:
Code: Select all
for i, obj in pairs(self.level.layers["Platforms"].objects) do
local platform = World:newRectangleCollider(obj.x, obj.y, obj.width, obj.height)
platform:setType("static")
platform:setCollisionClass("Platform")
end
Example: Player (red box) bumps between two colliders