Player in Spaceship

I want to realize space game on Unity3d engine. There are some huge spaceships in the void. So, I want players flying in space in weightlessness, but when they go inside any spaceship, they will be under the influence of local gravity field of spaceship (if it is in On state).

I going to do it using addForce() function applied to rigidbodies of players towards spaceship floor. But with this approach Players will be only magnify to a floor, but not to stay on they feet automatically.
How can I put they on they feet the best way?
Or, maybe, anybody knows the completely different approach to solve this custom gravity fields issue?

PS: It will be a multiplayer game with many ships with different orientation in space with a lot of players in them. Each ship has it’s own gravity field.

You can simply toggle UseGravity flag of rigid body to perform such scenario (Suppose ,In outer-space players are not using gravity property of rigid body and as they get inside ship turn on gravity property ) , may be i did not get the question because it’s not a tricky one how i see it.

when theyre outside, do rigidbody.useGravity = false;
then when they are inside do rigidbody.useGravity = true;

(this might be different in unity 5, not sure but if that doesnt work try this)

gameObject.GetComponent<Rigidbody>().GravityEnabled = false;