I'm so sorry if this has an obvious fix but I'm really new to GML and I haven't been able to find a fix online. I've been racking my brain for hours trying to figure out why my movement system barely works. as of right now, the player character can move through the sides of walls and can thus jump inside of them, it slowly sinks through the floor on floating platforms, but not the ground, and can jump up into said platforms.
here's the create event code:
movespd = 4;grv = 0.3;jumpheight = 7;vspd = 0;and the step event code:
ground = layer_tilemap_get_id(layer_get_id("Ground"))isgrounded = place_meeting(x, y+1, ground)if keyboard_check(ord("A")){ if (tilemap_get_at_pixel(ground, x-1, y) == 0) { x -= 1 * movespd }}if keyboard_check(ord("D")){ if (tilemap_get_at_pixel(ground, x+1, y) == 0) { x += 1 * movespd }}// verticle movementspriteleftfoot = x - sprite_width - sprite_width / 2spriterightfoot = x + sprite_width - sprite_width / 2vspd += grv //gravitynextY = y + vspd;if tilemap_get_at_pixel(ground, spriteleftfoot, nextY + sprite_height) != 0 { vspd = 0; } else { y = nextY; }if tilemap_get_at_pixel(ground, spriterightfoot, nextY + sprite_height) != 0 { vspd = 0; } else { y = nextY; } //jumpif isgrounded and keyboard_check(ord("W")){ vspd -= jumpheight;}y += vspd