#Explain place_meeting and tilemap_get_at_pixel for me please

5 messages · Page 1 of 1 (latest)

nova plover
#

from what I understand when reading these functions

tilemap_get_at_pixel

  • Checks a tilemap
  • Checks a specific point in the room
  • Returns 1 or 0 depending if the tilemap is present or not

place_meeting

  • Checks a specific point in the room
  • If two collision masks are overlapping in that spot returns true. Otherwise it returns false.

someone verify?

#

Explain place_meeting and tilemap_get_at_pixel for me please

acoustic flame
#

Returns 1 or 0 depending if the tilemap is present or not
not quite

it returns tile data. If the tile is unflipped and untampered, then tile data is 1 if there's a tile and 0 if it's not

but it's not necessarily 1/0 if the tiles are flipped or rotated or any other transformation

the example on the docs:

var data = tilemap_get_at_pixel(map_id, 64, 128);
data = tile_set_flip(data, true);
tilemap_set_at_pixel(map_id, data, 64, 128);
#

Checks a specific point in the room
you implied this with your 2nd point, but the accurate statement here is that it checks the collision as if an object were at that point. so even if that point is empty, if an object is wide enough to collide, it'll still return true

#

i clarify that, becasue there's a function position_meeting, that indeed checks at a point not considering collision masks