Simulating zero/artificial gravity?

I’ve been looking at ways to use Unreal Engine 4 to create interstellar ship concepts, though I may have sections where artificial gravity can be turned on and off; like compartments in a rotator arm. I also want to know about having gravity inside a ship, but zero gravity outside.

How would I go about doing this?