OfficerYoda / Fhysics

A Physics simulation
MIT License
0 stars 0 forks source link

Objects getting pushed outside of the boundaries #20

Closed OfficerYoda closed 1 month ago

OfficerYoda commented 1 month ago

sometimes when there are a lot of objects some will get pushed outside of the boundary and will not be picked back up by the quadTree

OfficerYoda commented 1 month ago

i think its because they will get send back up to the qt root during rebuilding but when trying to insert them back they wont find a node which fits

OfficerYoda commented 1 month ago

when qt only consits of root this doesn't happen

OfficerYoda commented 1 month ago

it was caused by an optimization i did where only nodes adjacent to the boundary would check for boundary collision, but when objects would move too much during one update and they werent on a boundary adjacent node they would get lost