Topic was automatically imported from the old Question2Answer platform.
Asked By
Yasin
I am trying to create a platform game like temple run in 2D. I created the platform using tilemap . But how can I instance the tilemap as the player moves ?
var tileMap = preload("PATH TO SCENE")
func placeTileMap(pos,rot):
var tileMapInstance = tileMap.instance()
tileMapInstance.position = pos
tileMapInstance.rotation = rot
$"TILE MAP MANAGER".add_child(tileMapInstance)
Thanks for your code.
I create a spawner_ground(Node2D) and attached a child node TILE MAP MANAGER(Node).Put the code in spawner_ground script . But on executing i got a blank screen . Why is that ?