Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Area2D CollisionMask is bugged #44220

Closed
LordBrkica opened this issue Dec 9, 2020 · 2 comments
Closed

Area2D CollisionMask is bugged #44220

LordBrkica opened this issue Dec 9, 2020 · 2 comments

Comments

@LordBrkica
Copy link

LordBrkica commented Dec 9, 2020

Godot version:

3.2.3 Mono

OS/device including version:

Windows 10, Rx570, GLES2

Issue description:

Lets say I have 2 Area2D objects AreaA (on CollisionLayer1) and AreaC (CollisionLayer2).

I set the CollisionMask of AreaA to 5 and AreaC to 1.

If I then call AreaA.GetOverlappingAreas() while areas A and C collide - I will get result other than empty array.
This is extremly broken and dangerous. It basically renders the entire concept of collision Layers and Masks uselles, one cannot rely on them at all.
Changing the mask of C suddenly changes the GetOverlappingAreas of A !

If AreaC has a CollisionMask to some other value (other than 1) - AreaA.GetOverlappingAreas() returns empty array (as expected)

Steps to reproduce:
Look at the posted example.

Minimal reproduction project:
Area2dBugtesting.zip

@madmiraal
Copy link
Contributor

Duplicate of #7644.

BTW There is a PR to fix this: #42268

@LordBrkica
Copy link
Author

LordBrkica commented Dec 9, 2020

Holy shit - this bug stems from January 2017.

Why not put with some information (WARNING or something like that) in the documentation of GetOverlappingAreas() that the method is broken ?
I mean its broken, its known - why not state the obivous as some warning ? One can always delete the warning when the fix is implemented.

Wow - this guy said the exact same thing in 2018.
I dont understand why is the method not marked as semi-functional ? Who knows how many people we failed to inform in time, this is horrible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants