Adding Life support to Entities

I have actually added Life Support vis-a-vi environment to my TARDIS entity, however the gravity is all messed up. I am unsure of how to run a check to determine if the entity in space or on a planet. Else when i input the gravity’s value, it remains the constant for all places. For example, when i set it to 1(the default planet’s gravity), i fall in space. When I set it to 0, it floats in a planet. I am using spacebuild and RD. Any help would be appreciated