Technically, it's not perfect.. You can still glitch through platforms that you would like to stand on. But, besides that, the physics are great and it really is a good jumping base.
Getting picky here...the Gravity variable might be more accurately called the Velocity variable. Gravity is an acceleration, which is a change in velocity. So the gravity part here is the -0.1 you are subtracting from the velocity. Sorry for the physics lesson :)
This is a perfect jumping script. If you want to include this in one of your projects, feel free to add it. No need to give me credit. Press the up arrow to try it yourself!
Comments
You need to be logged in to post comments
Add a Comment
You know what? Im using this in my Mario game, and I'm gonna give you credit anyway because you make really cool stuff. Keep it going!
Scratch that (Horrible pun), for some reason it isn't working for my sprite. Sorry!
(view all replies)great!
it's a good script!
Technically, it's not perfect.. You can still glitch through platforms that you would like to stand on. But, besides that, the physics are great and it really is a good jumping base.
I know it glitches, and I would make it better if I knew how to do hit sensors. But for now, I just have this.
awsome it really helps
dasketchmaster, u r now in SGX. Go nuts :)
huzzah
awesome
thanks if you ever make a game where you can jump use that script IT HELPS! :)
Getting picky here...the Gravity variable might be more accurately called the Velocity variable. Gravity is an acceleration, which is a change in velocity. So the gravity part here is the -0.1 you are subtracting from the velocity. Sorry for the physics lesson :)
uhh...that's fine.
Very nice! It works great :)