0 votes

Hey everyone I have an Issue with getcollisionlayer(). I instance a scene, add the scene to the current tree, and then get the collision layer of the scene. The mask is set 1. However getcollisionlayer() returns not 1 but 2147483649.
I updated Godot to 3.2.4 rc1 in hope it fixes the problem. It actually did and it properly returned 1 this time arround, without me changing any code at all. After changing some code and restarting the engine it doesn't work anymore however. No matter what I do it's back to 2147483649. Any ideas?

Edit: So I have found a way to get it working again. The node I was instancing was a KinematicBody2d. The parent of these instances already had a few instances as children, these were not instanced by code but by the editor. I deleted all of these instances and tried it again, this time it worked. Then I added all of these instances in the editor again and it worked.
So for anyone having the same issue, deleting the nodes in the editor and adding them again seems to work. This might be a bug in the engine, unless I'm doing something wrong here.

Godot version 3.2.4
in Engine by (17 points)
edited by

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.