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.

DarkBASIC Professional Discussion / DBPRO FPS Matrix Jumping Help

Author
Message
Darkbasic FPS help
15
Years of Service
User Offline
Joined: 29th Mar 2011
Location:
Posted: 2nd Apr 2011 21:37
Can u guys help with jumping on a matrix. I've tried various coding but i still can't get it to work.

My code so far is
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 2nd Apr 2011 22:58
What's the problem?

Overall, you need an engine which drives the character on the ground, constantly giving it Y position with 'get ground height'.

When jumping, disable this engine, and do the followings:


1. You need a target height calculated from the current height plus the max jump height.

2. Move the character upwards to this target height while constantly losing speed.

3. Then start falling with gaining speed (speed can't go above the value of the variable 'gravity', which value highly depends on your world size) until character height equals the current matrix height.


That's all.

Login to post a reply

Server time is: 2026-07-11 14:56:57
Your offset time is: 2026-07-11 14:56:57