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.

Author
Message
viscera eyes
20
Years of Service
User Offline
Joined: 29th Apr 2004
Location: the moon
Posted: 13th Aug 2004 08:07 Edited at: 13th Aug 2004 08:47
what is the simplest way to make a character jump
im using DBP
Physics coder
20
Years of Service
User Offline
Joined: 25th May 2004
Location: United States
Posted: 13th Aug 2004 10:43 Edited at: 13th Aug 2004 10:44
you could have a y_velocity# variable for the player, and set the y_velocity# to some positive number whenever the user presses the spacebar or whatever your jump key is, and then decrease the velocity by 9.8 meters per second, and then set the y velocity to 0 when the character is back on the ground. You'd need to update the player by the velocity. Plus only "jump" when the character is on the ground, or else the y velocity would always be positive whenever the spacebar is presses, giving the player a jet-pack effect.

-----------------------------------
To delete the bug, delete the code.
Specs: Sony VAIO Laptop, Windows XP, P4 2.8Ghz, 512MB RAM, ATI Radeon 64MB video memory, DBP Upgrade 5.3.
viscera eyes
20
Years of Service
User Offline
Joined: 29th Apr 2004
Location: the moon
Posted: 14th Aug 2004 15:25 Edited at: 16th Aug 2004 10:53
thanks but im not very good so could you give me the code?

Login to post a reply

Server time is: 2024-11-27 06:45:39
Your offset time is: 2024-11-27 06:45:39