Skip to content

Area2D overlapping StaticBody2D detects incorrect layers when both use WorldBoundaryShape #622

Description

@Pyrocreep

Describe the bug

The Area2D is able to detect a RigidBody2D on the incorrect layer and emits "body_entered".

To Reproduce

  • Create an Area2D + WorldBoundaryShape, set to layer 1 mask 1
  • Create a StaticBody2D + WorldBoundaryShape, set to layer 1 mask 1
  • Create a RigidBody2D, set to layer 2 mask 1
  • Make the Area2D and the StaticBody2D overlap
  • Drop the RigidBody2D into the Area2D

Expected behavior

The Area2D should not emit the "body_enter" signal, as they are not on the same layer.

Environment:

  • OS: Windows 11
  • Version: 0.35.2
  • Godot Version: 4.7

Example project(zip)

https://drive.google.com/drive/folders/1Zw8EKNyK8DByqOqjTuURFv9PstT3U3Xe?usp=sharing

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions