Source code available here: https://github.com/bit-shift-io/fido-and-kitch
inn map.lua:138 I print out the rectangles for my tile collisions which looks like this:
Code: Select all
print('rect:', quadX, quadY, width, height)
local col = Collider{
shape_type='Rectangle',
shape_arguments={quadX, quadY, width, height},
body_type='static'
}
Code: Select all
rect: 752 48 32 32
rect: 784 48 32 32
rect: 816 48 32 32
rect: 848 48 32 32
rect: 880 48 32 32
rect: 912 48 32 32
rect: 944 48 32 32
My player is setup a a fixed rotation, dynamic body rectangle (player.lua:71) and I use setLinearVelocity to apply the player movement (player_states.lua:116)
Yet for some reason the player occasionally gets jammed on the corner of a tile, but not always.... and I'm not sure why!?
If you run for you self, test the map "ll1.lua"