- Home /
Answer by robertbu · Jul 22, 2013 at 04:25 PM
There are many posts about faux-gravity. The idea is that you apply a force on your character towards the surface you want to adhere to. You can get the vector to apply the force mathematically, or you can use raycasting to get the normal to the surface if the surface is not uniform. Google for some combination of 'tube', 'tunnel', 'sphere', 'inside', 'gravity', for a number of posts with some scripts. Here are a few hits:
http://answers.unity3d.com/questions/56494/custom-gravity-based-on-normal-vector-and-rigidbod.html
http://forum.unity3d.com/threads/8873-Faux-Gravity-making-my-brain-spin-Help!
http://answers.unity3d.com/questions/253809/gravity-inside-spherenot-like-mario-galaxy.html
http://answers.unity3d.com/questions/436294/rigidbody-rotation-around-centerofmass.html?sort=newest
@Anoki if this solved your problem you should mark it as the answer. It helps future readers and gives you karma.
Your answer
![](https://koobas.hobune.stream/wayback/20220613110615im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
[Closed]Player Sticking to Floor in Zero Grav 1 Answer
Allign player to walls? 0 Answers
Car Tutorial adding other cars 1 Answer
Camera enable/disable problem. 1 Answer