[2.0.48] Asteriod with 0 relative velocity not destroyed
Posted: Mon May 12, 2025 7:37 pm
Asteriods may not be destroyed even when close to 0 relative velocity
https://www.twitch.tv/antielitz/clip/Ne ... 11K1te4isx
https://www.twitch.tv/antielitz/clip/St ... Ha3pJ-xZOM
https://www.twitch.tv/antielitz/clip/Sl ... yuONfLuA55
https://www.twitch.tv/antielitz/clip/Ig ... wsgy8mKgj2
The problem seems to be that the ship speed can change after impact:
Tick 0: asteriods has speed of rel 10 km/s
Tick 1: asteriod collides with ship and gets down to rel 1 km/s
Tick 2: the ship speed changes (either breakign or natural production occileration). Asteriod rel speed is now -1 km/s due to ship changes
Current bahavior: Asteriod moves away from the ship or gets stuck.
Expected behavior: Asteriods that just collided and have 0 relative velocity get destoyed.
Possible fix: When an asteriod collides with the platform it gets a permanent flag. Asteriod that are flagged from previos collision and have negative speed, get destroyed.
Result: Asterids no longer get stuck in the platfrom or are pushed away after a colision with a platform.
https://www.twitch.tv/antielitz/clip/Ne ... 11K1te4isx
https://www.twitch.tv/antielitz/clip/St ... Ha3pJ-xZOM
https://www.twitch.tv/antielitz/clip/Sl ... yuONfLuA55
https://www.twitch.tv/antielitz/clip/Ig ... wsgy8mKgj2
The problem seems to be that the ship speed can change after impact:
Tick 0: asteriods has speed of rel 10 km/s
Tick 1: asteriod collides with ship and gets down to rel 1 km/s
Tick 2: the ship speed changes (either breakign or natural production occileration). Asteriod rel speed is now -1 km/s due to ship changes
Current bahavior: Asteriod moves away from the ship or gets stuck.
Expected behavior: Asteriods that just collided and have 0 relative velocity get destoyed.
Possible fix: When an asteriod collides with the platform it gets a permanent flag. Asteriod that are flagged from previos collision and have negative speed, get destroyed.
Result: Asterids no longer get stuck in the platfrom or are pushed away after a colision with a platform.