Closed ohlidalp closed 9 months ago
Converting to draft because more issues got reported on Discord: https://discord.com/channels/136544456244461568/189904947649708032/1127748999286362132
I tackled the right problem - overstretched bounding box. I just need to go even smarter about it. I already did an experiment once to detect any detached parts: https://github.com/RigsOfRods/rigs-of-rods/commit/ead8411f88b60dd650a63cf1fdb2e1ff5c088964
Good news: the main problem is fixed:
Bad news: I discovered another scenario. Simply driving far enough away will eventually cause the same issue:
Resetting to spawn doesn't stop it. Easier to reproduce on other terrains such as the Community Map.
Oddly enough I haven't been able to reproduce using a plane:
Oops, I forgot to reset the new cabnode-boundingbox so it grew indefinitely. Fixed.
The plane probably doesn't have any collision cabs on it so it's completely excluded from the eventbox triggering.
Fixed #3058 - caused by 539a1b24f50bad880611f245c76b634dbde1ad84
Solution: instead of considering the whole bounding box when evaluating eventboxes, only consider a bounding box around collision cab nodes. It makes more sense physically and also eliminates surprises, as loose cab nodes would be easily visible.