• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML how to make perfect tileset collision?

duran can

Member
I'm trying to platform game, using new tileset system. How can i do perfect collision with tileset?
Code:
sw=bbox_right - bbox_left+1;
sh=bbox_bottom - bbox_top+5;
//bottom collision
if ( tilemap_get_at_pixel(map_id,x,y+sh/2)!=0 
|| tilemap_get_at_pixel(map_id,x+sw/2,y+sh/2)!=0 
|| tilemap_get_at_pixel(map_id,x-sw/2,y+sh/2)!=0){
move_contact_all(direction,1);
speed=0;
vspeed=0;
hspeed=0;
}else{direction=270;speed=grv;}
Adsız.png
thanks for all replies
 
Top