0 votes

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 moveandslide()

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

in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.