Open metacrab opened 2 years ago
fyi i'm just doing this as a temp fix for now 🤷
Dynamic adding, removing and updating parts in the collision system is not well battle tested, so this is probably a bug :)
Noted! I'm doing it in a prototype at the moment and there have been a few little things I needed to fix but overall not too bad.
In CollisionModule, descendants of the collision folder are factored into the collision hash map and recorded in module.hullRecords.
When an instance is removed, it is automatically removed from the hash map (line 900), but the module.hullRecords reference still exists.
If the same instance once again becomes a descendant of the collision folder (e.g parented to nil, then re-parented), ProcessCollisionOnInstance returns because the module.hullRecords record already exists and the instance is not added to the collision hash map.
I'd file a PR but I'm not sure what the intention is. You could remove the module.hullRecords reference in DescendantRemoving on line 903 if you're only using it as a debounce type thing.