Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve spaceship automatic landing #305

Merged
merged 30 commits into from
Feb 15, 2025

Conversation

BarthPaleologue
Copy link
Owner

Related Tickets

Fixes #227

Description

The goal of this PR is to make spaceship landing more predictable by leveraging the physics engine in a cleaner way.

This is also an opportunity to extract this logic to a new component called the "Landing Computer".

The landing computer also unifies landing pad and surface landing procedures.

Unexpected difficulties

Torque is not mentionned in Havok, it is called angular impulse instead.

How to test

Try to land on any space station and on any planetary surface. Landing should either succeed or time out.

Known issue: when landing on planetary surfaces the spaceship wings can get stuck in the ground. A more durable solution will be needed, possibly by adding landing legs.

Follow-up

Further auto pilot can be implemented for NPCs in the future. And surface landing can still be improved.

@BarthPaleologue BarthPaleologue linked an issue Feb 13, 2025 that may be closed by this pull request
Don't crash when the div is not present, rather inject it in the html directly
is the speed delta is small then we do nothing
It can land on landing pads!
we have to debloat this mess
this will avoid being stuck forever if it happens
it would no longer trigger when crossing rings => the type of TelluricPlanet was incorrect!
This is useful for testing landing on surfaces
This should reduce occurences of clipping through objects because of ship controls
Courtesy of Claude 3.5 Sonnet. The test written are much better than what I would have done
If there are no results after raycasting, a special status is emitted and handled by the spaceship to cancel the landing
Now the subsequent flares are still visible, only the anamorphic and the central dot are hidden
This allows to move faster hotizontally while being careful vertically
this will allow for finer collisions hopefully
@BarthPaleologue BarthPaleologue force-pushed the 227-improve-spaceship-automatic-landing branch from 2b10e47 to a5415d4 Compare February 13, 2025 21:00
@BarthPaleologue BarthPaleologue merged commit d7d93ee into main Feb 15, 2025
4 checks passed
@BarthPaleologue BarthPaleologue deleted the 227-improve-spaceship-automatic-landing branch February 15, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve spaceship automatic landing
1 participant