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

Collision with docking surface entirely moved on SpaceStation #3920

Merged
merged 1 commit into from Feb 19, 2017

Conversation

mike-f1
Copy link
Contributor

@mike-f1 mike-f1 commented Feb 6, 2017

This PR is to correct a new bug, easily reproducible: you start at earth, take-off then try
to hit spaceport landing surface: you can pass through it :/

After last changes, ground station have no more two layers of collision mesh (one not flagged
and one flagged) but only a flagged flat surface.
This means less work for collision system, and also for modellers. More, this not rely on
eight of "mushroom-shaped" collision meshes and is definitely a step ahead.

But this means also you need to bounce (collide) with flagged surfaces if you're not trying
to dock (this is specific for planet starport), OR you need to pass through collision volume
when you aren't docking and you want to fly through the central hole of orbital stations..

To solve this I removed the collision checks for flagged surfaces from Ship and put things
on SpaceStation. Now, if SpaceStation detect an hit with Ships, is entirely responsible for
reaction: if Ships are docking, then:

  1. a collision will trigger the docking sequence and
  2. OnCollision for SpaceStation return false (this to avoid "bounce").

Else (so when Ships aren't docking):

  • if SpaceStation is an orbital, do nothing.
  • if SpaceStation is ground station, directly call: s->DynamicBody::OnCollision() (which is the
    method called actually) and return true, letting Space to "bounce" Ship.

A side effect of this change is that you no longer have damages on Ships even at high time accel
and even if you have flat hull or tag_landing not well positioned (under some limit...).

@fluffyfreak fluffyfreak self-assigned this Feb 19, 2017
@fluffyfreak fluffyfreak merged commit 097c45f into pioneerspacesim:master Feb 19, 2017
@mike-f1 mike-f1 deleted the collision_on_station branch February 19, 2017 22:22
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.

None yet

2 participants