How to get tile name when colliding

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By shoyguer

How can I get the tile name when colliding with it?
This is the name of my tile:

enter image description here
This is the code which is inside a KinematicBody2D:

func _on_Collision_interacitons_body_entered(body):
	var type = body.tile_get_name()

But when I try to run the game I get the following error:
enter image description here

:bust_in_silhouette: Reply From: Surtarso

you are trying to get a a tile name from a kinematic body (unless you checked “kinematic” in the tilemap inspector

try this to get names:

func _on_Collision_interacitons_body_entered(body):

but tilemaps are not bodies unless specified in the inspector (collision_use_kinematic)