![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | javrocks |
extends KinematicBody2D
var cell
var tile_id
func _ready():
pass
func _physics_process(delta):
if (collision.collider.name == “TileMap”):
cell = tile_map.world_to_map(position)
cell -= collision.normal
tile_id = collision.collider.get_cellv(cell)
print(cell)
#After that this error appears Invalid get index ‘collider’ (on base: ‘Nil’).
It gives me the same error for:
if (collision.collider.name == “TileMap”):
what should i change it to
javrocks | 2021-04-04 14:46