• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows how do i invert gravity

G

gekidoshi

Guest
so I want to make an area that changes the players gravity when he is located within it
 

FoxyOfJungle

Kazan Games
It is just to make your variables invert the sign, but it will depend a lot on your code, for example, if you do vsp += 1, then now it will be vsp -= 1. You can add a multiplier at the end, for example, the variable is initially 1, so anything multiplied by 1 will be itself. Now if you activate "inverse gravity", you set this multiplier variable to -1 and this will reverse the direction of gravity.
 
Top