2D Physics, Exclude Colliders from Collision Solving

Hey there

I am working on a game with a somewhat specific 2d physics setup.
The game features environment elements with static colliders.
Then there are ships with dynamic rigidbodies that must be able to collide with the environment.
So far, nothing special.

Then, however, there are also player characters and other objects that are onboard the ships.
These must collide with the ship as well as the world.

The problem I am having is, that when an object gets pushed into a side of the ship, to solve the collision the object but also the ship are moved. This means, if an object clips into the ship, the ship starts jittering uncontrollably.

What I would like to achieve is that for the player, the ship is treated as if it were kinematic.

What I have tried so far:

  • Increasing the mass of the ships
  • Adding two rigidbodies, one dynamic handling ship collisions, one kinematic shandling ship to player collisions

Both lead to very ustable results.

Is there a way to tell Unity to not move a rigidbody when solving certain collisions?

Thanks