pioneerspacesim / pioneer

A game of lonely space adventure
https://pioneerspacesim.net
1.63k stars 376 forks source link

No bounding box for SAR ship? #5740

Closed claudiusmueller closed 1 month ago

claudiusmueller commented 8 months ago

Observed behaviour

A SAR mission to deliver crew does not trigger transferring the crew to the target ship, even when very close (<50 m) to it. This may be related to the fact that I can fly right through the target ship (a bluenose)? I should probably dig into the SAR code to see if this causes it. But the missing bounding box is definitely an issue.

Expected behaviour

The crew transfer should trigger once I am within 50 m of the target ship. I should also be able to crash into the ship, not fly through.

Steps to reproduce

In the attached save game - just fly straight ahead and you will fly through the ship in front of you. In addition, the trigger to transfer crew is not catching.

My pioneer version (and OS): pioneer version: e7f3122dc OS: openSUSE 15.5

My output.txt (required) and game save (optional, but recommended) output.txt pioneer_debug.zip

claudiusmueller commented 8 months ago

I should add that rebuilding the model cache (make -C build build-data) didn't make a difference using the attached save game.

Web-eWorks commented 8 months ago

Haaaah... this is a right problem. The target ship and the player are in two separate frames. The target ship is assigned to Hebihe C, but the player is in Hebihe D. The system generation algorithm isn't taking into account the maximum distance it has available between the previously-generated body and its own orbit to generate satellites into.

impaktor commented 7 months ago

The target ship and the player are in two separate frames.

Remind me @Web-eWorks this is something that requires deep re-write of collision code?

Web-eWorks commented 7 months ago

This isn't a collision code issue per-se, but rather system generation - the system in question is generated such that multiple body "sphere of influence" areas are overlapping and the game code can't decide which body "owns" the ship. It's a problem related to our 2-body approximation of the N-body problem and the only "fix" is to ensure systems aren't generated such that sibling body SOIs are overlapping.

impaktor commented 1 month ago

This is same as #5885, @fluffyfreak ?

fluffyfreak commented 1 month ago

Yes, this is the same issue 👍