OfficerYoda / Fhysics

A Physics simulation
MIT License
0 stars 0 forks source link

Objects not removing correctly #25

Closed OfficerYoda closed 4 months ago

OfficerYoda commented 4 months ago

When trying to remove objects by clicking on them they only get sometimes removed.

OfficerYoda commented 4 months ago

It seems that objects which are fully contained within the top-left QuadTree node (regardless of the subdivision level) are always able to be removed first try. However, objects in other nodes often fail to be removed or require multiple attempts to be removed..

OfficerYoda commented 4 months ago

It was caused by clearing the removeQueue before every node had the chance to remove the object. Fixed by only letting the root clear the removeQueue.