How To Guides
Physics Simulations
How to Use Spherical Gravity
6min
spherical gravity is a type of gravity that is simulated in games by assuming that all objects in the game world are attracted to the center of a sphere this is the same way that gravity works in the real world, and it allows for a more realistic and immersive gaming experience hazards example gravity in gaming in games that use spherical gravity, objects are always pulled towards the center of the sphere, regardless of their orientation this means that if you are standing on the surface of a planet, you will always feel the pull of gravity downward, even if you are facing sideways or upside down here are some additional tips for using gravity in game design bottomless pits a classic hazard in video games they can be used to create a sense of danger and suspense, or to simply provide a way to kill the player water a dangerous hazard in video games it can drown the player, or it can be used to transport the player to different areas of the game world spikes another classic hazard in video games they can be used to kill the player instantly, or they can be used to create puzzles let's explore how to add some hazards into our own scenes now that we have some historical perspective! first off, we will add a spike to the scene through sceneri's intuitive interface, we will locate the "hazard" asset in the asset browser and seamlessly incorporate it into the level using the gizmo tool now that we have the spike into position we want to add a rotating component within the spike properties by opening the inspector panel entering play we should now see the spikes rotating in the scene the last step we need to do is add a hazard component from the add component panel on the left side we can then drag the hazard over to the spikes object and have it overlap the spike volume overall, spherical gravity is a good option for games that need to simulate gravity in a simple and immersive way however, it is important to be aware of the limitations of spherical gravity before using it in a game here are some examples of games that use spherical gravity super mario galaxy this game features spherical gravity, which allows mario to walk, jump, and spin on the surface of planets no man's sky a vast universe of planets that players can explore the gravity on these planets is also simulated using spherical gravity elite dangerous this game features spherical gravity, which allows players to pilot ships in space and land on planets as you can see, spherical gravity is a versatile tool that can be used to create a variety of gaming experiences by using spherical gravity effectively, developers can create games that are more realistic, immersive, and enjoyable for players feedback please be sure to submit issues or feature requests through the embedded feedback form in the event it is a major issue please contact us directly through discord