#### Ateborrachas

##### Member

GML:

```
function PlayerCollision(){
var _collision = false;
//Horizontal
if(tilemap_get_at_pixel(collisionMap, x + hSpeed, y))
{
x -= x mod 16;
if(sign(hSpeed) == 1) x += 15;
hSpeed = 0;
_collision = true;
}
x += hSpeed;
//Horizontal Entities
// Vertical
if(tilemap_get_at_pixel(collisionMap, x, y + vSpeed))
{
y -= y mod 16;
if(sign(vSpeed) == 1) y += 15;
vSpeed = 0;
_collision = true;
}
y += vSpeed;
return _collision;
}
```