This site requires JavaScript, please enable it in your browser!
Greenfoot back
deadbird11
deadbird11 wrote ...

2016/3/20

Gravity and Jumping?

deadbird11 deadbird11

2016/3/20

#
How would I make a world where my character can jump? I tried using a for-loop to reassign the y coordinate over and over again, but then I realized that if the ground the character was landing on was higher than the ground it started on, this would definitely not work. How would I make the gravity work and how do I make a solid ground that the character can land on? Thanks for the help.
danpost danpost

2016/3/20

#
I have a Jump and Run Demo w/Moving Platform scenario that you can look at. Just run the scenario here on the site. The buttons along the bottom will allow you to view the codes of the different classes. The jumping character is in the 'Who' class.
deadbird11 deadbird11

2016/3/21

#
Thanks so much!!
You need to login to post a reply.