+1 vote

I have this enemy scene that is a kinematic body 2d. I am setting the collision layer and mask but it gets reset to 0, 0 when I run the game. Any ideas why this might be occurring? I'm inheriting from a parent scene called enemy and the collision shape is on that scene.
Layer and mask is set in the editor

Resets when the scene is instanced in game

asked May 9 in Engine by Kaan Alpar (31 points)

How are you instancing the enemy?

I instance it before the scene is run. I'm not instancing it dynamically. It's a child of the level node, which is just a node 2d.

1 Answer

0 votes
Best answer

I couldn't get it to work from the editor so I just set the collision layer with gdscript.

answered May 12 by Kaan Alpar (31 points)
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.