Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / [SOLVED] Jump Curve

Author
Message
Tweak4141
1
Years of Service
User Offline
Joined: 23rd Apr 2022
Location:
Posted: 22nd May 2022 12:48
I'm trying to create a jump mechanism without using physics, however my end code puts out an awkward looking jump.
Would it be possible to make a nice curved jump without using physics?

The author of this post has marked a post as an answer.

Go to answer

Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd May 2022 18:37
Without using physics? But the very math necessary to jump involves physics, I don't understand your question. You need a velocity vector and apply a gravity vector to it, that's simply how jumping works.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Tweak4141
1
Years of Service
User Offline
Joined: 23rd Apr 2022
Location:
Posted: 22nd May 2022 20:46 Edited at: 23rd May 2022 00:44
Sorry, I meant without using AppGameKit's physic's engine



MOD edit: Make sure to close the code tag but thanks for trying
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd May 2022 08:55 Edited at: 23rd May 2022 09:10
This post has been marked by the post author as the answer.
Gravity is a constant so you subtract fixed value from your Y position (I use 0.7 in the example)
When you jump you add the force to the y co-ordinate, Much more than when your walking. (I use 10 in the example)
LEFT/RIGHT ARROW TO MOVE UP ARROW to JUMP

Attachments

Login to view attachments
Tweak4141
1
Years of Service
User Offline
Joined: 23rd Apr 2022
Location:
Posted: 23rd May 2022 22:27
Thank you blink0k!
I'll make sure to close the code tag next time.

Login to post a reply

Server time is: 2024-03-28 09:31:09
Your offset time is: 2024-03-28 09:31:09