#Retrieving custom data of tile under mouse position

1 messages · Page 1 of 1 (latest)

prisma gorge
#

Im a bit at a loss here.
My code seems to be just the way the docs let me to believe it works.
Hovering over tiles returns a null object tho

Printing mouse and tile position reveal reasonable numbers too:

print("Mouse Position:", mouse_pos)
print("Tile Position:", tile_pos)

Mouse Position:(386, 154)
Tile Position:(3, 2)
Mouse Position:(386, 153)
Tile Position:(3, 1)

lucid wolf
#

wdym with "hovering over tiles returns a null object"

Can you show the error and the offending line?

spark hinge
prisma gorge
prisma gorge
prisma gorge
atomic maple
#

right, you should not be using a TileMap AND TileMapLayer Nodes at the same time

#

it's one or the other(s)

atomic maple
#

try making the parent a Node2D and not a TileMap

#

and calling the functions on the children

prisma gorge
#

Thanks that was the problem

spark hinge
#

oh, sorry didn't see the rest of the posts

prisma gorge
#

Yeah all is working