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.

Dark Physics & Dark A.I. & Dark Dynamix / [DarkPHYSICS] How to jump with PhysX

Author
Message
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 29th Aug 2006 15:56
Here is a small sample showing how you can make your player jump. It may be improved to detect when player hit the ground to enable/disable jump. But it can show how you can use the DISPLACEMENT commands to create jump effects with affecting X/Z movements.



Feel free to improve it.

All we have to decide is what to do with the time that is given to us.
ESP
18
Years of Service
User Offline
Joined: 2nd Aug 2006
Location: London, England, U.K.
Posted: 29th Aug 2006 16:10
Hi Freddix,

A bit wierd that one does not drop if moving with the keyboard?

Will anyone crack this?

Robin
JerBil
20
Years of Service
User Offline
Joined: 8th May 2004
Location: Somewhere along the Z axis...
Posted: 30th Aug 2006 03:59 Edited at: 30th Aug 2006 04:03
This uses Lee's code for controller forward#,backward# but when going backward or left
it won't loose altitude because negative values are upward.

Notice you no longer need

and only a small value is needed to go up and down since we set the
value to -200 just after creating the character controller earlier
in the code.

Might say too that the value MCKey would not cause the up action
because it needs a floating number. Hence the -1.0 and 1.0 for
up and down.




Ad Astra Per Asper
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 30th Aug 2006 12:22
JerBil: Thanks for the changes

I've made a modified version that use JUMP variable to define a JUMP height.
You can change the jump height changing the line :


Here is the full code:



All we have to decide is what to do with the time that is given to us.
Seeting
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Mindspace
Posted: 1st Sep 2006 17:12
The problem is that this rutin not jumps but flies

Syntax Entertainment
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 1st Sep 2006 18:00
it work on my computer.

All we have to decide is what to do with the time that is given to us.
Jammy
21
Years of Service
User Offline
Joined: 15th Jan 2003
Location: Scotland
Posted: 15th Dec 2006 14:47
I found this thread very helpful ,though, I felt, it made the character fly more than jump. I have posted my solution here

http://forum.thegamecreators.com/?m=forum_view&t=95085&b=32&p=0

in my nvidia compo entry area. Yes It is a blatant Plug but I hope someone will find it useful.

Login to post a reply

Server time is: 2024-11-24 14:23:08
Your offset time is: 2024-11-24 14:23:08