gravity world

hi everyone how can i create a gravity world

I dont think there is any real physic math behind that game you referer to here.

All you need to simulate a simple gravity is to decide if the hero is going up or down. Thats Ypos.

So lets say normal gravity for a hero is ypos - 0.1 for downward pull (going down). Swapping that into + 0.1 will make the hero fly upwards.

Secondly you need to flip his look.

Now, if you are doing this in Unity you probarbly have the 3D hero already and some platforms too.

You COULD use Unity’s build in physics for it. But then you would still have to flip the gravity pull on the rigidbody on the hero.

Check tutorials on how to use Unity physics, then I think the answer will become much more clear than I can explain here.

Here is a great place with loads of tutorials:

http://www.unity3dstudent.com/2010/07/beginner-b00-adding-mass-gravity/