Inner Gravity on a sphere... Is it possible or just a lost cause?

Ok, Here it goes…
I’ve recently embarked (woof woof) on a BGE beginner game (Yes, my first one…well kind of).
In this venture I have a level that requires the player to become entrapped in a sphere of anti-gravity (like a vacuum).

Now I know how to get gravity on a sphere, heck I even found out how to repel objects off a sphere… But for the life of me I can’t get the player to work in a vacuum, lol. I thought about firing him/her, but he/she works for free… So I trudge on.

I am able to get objects to go from the center of the sphere, but when they hit the sphere’s walls they pass right through. I I’ve flipped the Normals , but that didn’t work. Applied different Physics Types neither worked. No matter what I’ve tried the testdumbie (a small sphere) just pops out of the globe (the main sphere).

If anyone knows a way to acomplish inner gravity in a sphere… can you help a noob out here, lol.

Thanks for atleast reading my thread.:confused:

I’m guessing that you want to be able to walk about on the inner surface of a sphere. And that an object placed anywhere in that spherical space will fall toward the surface. Ok. If you have figured out how to repel from an object place that object at the centre of the sphere. If your player object passes through the floor it may be that it’s travelling too fast. You could reduce the “grav” force, tweak the physics “steps” settings. And set your hollow sphere’s collision bounds to “mesh”. Maybe give the shell some thickness with the solidify modifier. Some combination of these might allow time for the collision to be calculated.


if sphere.getDistanceTo(agent) < radius:
    agent.applyForce(sphere.getVectTo(agent)[1]*9.8,0)
else:
    agent.applyForce(sphere.getVectTo(agent)[1]*-9.8,0)

Both are great ideas. Thanks.