Indoor/outdoor of Object in different places

Not too sure if there is a term for doing this so I didn’t have any luck searching.

But essentially I want to have a Spaceship that moves around not affected by gravity but your character can also walk around inside the ship but inside there is gravity and of course the ship could be upside down etc.

So unless you can “orient” gravity only inside the ship I thought of having an inside of the ship somewhere outside the skybox or draw distance which is upright at all times and when the player presses the button to swap between the two they wouldn’t know any better.

So my question is how would I go about this separate “indoor” area for the inside of ships that you couldn’t just wander to while flying around. Such as literally outside the skybox so u can never reach nor see it. Place it really far away ad would that cause performance issues?

I’m open to any other ideas to create the effect I described above but that’s my best guess so far and not sure of the best way to make it happen.


Instead of using the standard gravity, you could apply a force to your character towards the floor of the spaceship. The default gravity is just a force with a magnitude of -9.81 on the Y axis. You can easily reproduce it with a force of your own.