Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Korred |
Hello
In my code i create dynamically village
My nodes config
Node
-TileMap
-Army
This function is in Node
func _ready():
var newVillage = newVilageScene.instance()
newVillage.setup("Kazak Dum", Vector2(32,32))
add_child(newVillage)
VillagesArray.append(newVillage)
Village is simple one
Village
-VillageSpriteSelected
-VillageSprite
-CollisionShape2D
-VillageName
Also i have army KinematicBody2D and it passes right through village, and can stand on top of it. Army moves with function move_and_slide()
When I add tiles with collision army cant move through it.
For both army and village both layer and mas is set to 1
Do you know why this is happening?
Thank you for your help