OfficerYoda / Fhysics

A Physics simulation
MIT License
0 stars 0 forks source link

Spawning objects can cause ConcurrentModificationException #21

Closed OfficerYoda closed 1 month ago

OfficerYoda commented 1 month ago

When spawning objects it sometimes causes a ConcurrentModificationException. This happens because the insertion through spawning with the mouse is not synced with the fhysics update cycle

Fix

add a list of objects which should be added in the next update loop

OfficerYoda commented 1 month ago

Fixed by adding a toAdd List to QuadTree.