- Home /
Question by
Toshi · Mar 29, 2013 at 05:24 PM ·
gravityplatformeritween
Platformer game and itween
Hello, now i'm trying to make 2.5d platformer game and it's based on the platformer tutorial. I want the character to move along itween path just like this. http://answers.unity3d.com/questions/29873/restrict-a-players-movement-to-a-path-for-a-25d-ga.html I accomplished to move the character along itween path but it hasn't gravity. how to add gravity to my character?
Comment
Answer by hexagonius · Mar 29, 2013 at 08:35 PM
If you mean Lerpz and you are using Move for moving the CharacterController, you will have to program the gravity yourself. My suggestion would be:
If you're grounded set y to -gravity. If you're not decrease y by -gravity * Time.DeltaTime
both of course before moving and that again multiplied by Time.DeltaTime
Your answer
![](https://koobas.hobune.stream/wayback/20220613095327im_/https://answers.unity.com/themes/thub/images/avi.jpg)