appsinacup/godot-rapier-physics

get_overlapping_areas() returns reference to self

Closed this issue · 2 comments

Describe the bug
Calling get_overlapping_areas() on Area2D can return array with reference to self instead of other Area2D

To Reproduce
Steps to reproduce the behavior:

  1. Create 2D scene containing 2 Area2Ds (Area1, Area2) with CollisionShap2D circles which are overlapping
  2. In script on scene root inside _physics_process call get_overlapping_areas() on Area1. It returns [Area2]
  3. Calling get_overlapping_areas() on Area2. Also returns [Area2]

Expected behavior
Calling Area1.get_overlapping_areas() should return [Area2]] (which it does)
Calling Area2.get_overlapping_areas() should return [Area1]] (which it does not)

Screenshots
Screenshot from 2024-03-05 21-40-59

Screenshot from 2024-03-05 21-40-36

Environment (please complete the following information):

  • OS: Linux, Ubuntu 22.04
  • Godot Version v4.2.1
  • Source: Plugin from Godot Asset Store (Godot Rapier 2D)
  • Plugin Version: 0.5.1
  • Rapier Version: 0.17.2 2

@Ughuuu Thank you so much! Awesome work!

Np. It was open for quite some time :D. Glad it got fixed.