I'm trying to create a FPS game in blender game engine. When I do KeyBoard[Spacebar] sensor and hook it up to a simple motion of z +1 or something like that, the guys pops up really fast as if he didn't have any motion between being on the ground and being in the air. Is there a way to make a more realistic, more slow jump in BGE?
2 Answers
You can do this by using the Linear velocity setting under simple motion. This will make your character's jump motion look much more realistic.
If you are using Character physics, you can simply use this setting.
You can change the settings for the character's jump speed and power in the Physics tab.
If you are using a dynamic object, or a rigid body object, you can use linear velocity along the z axis.
-
1$\begingroup$ maybe a tad smaller on the download pic. your getting close... $\endgroup$– ruckusCommented Mar 10, 2015 at 21:29
-
$\begingroup$ Shrinking it... $\endgroup$ Commented Mar 10, 2015 at 21:30
-
$\begingroup$ Is that better? $\endgroup$ Commented Mar 10, 2015 at 21:31
I use (these represent game logic)
Keypress-------and----------Motion (linv up)
if jump=0------/ \----------jump =30
if Ray-------/
if ray is positive, key is pressed and jump=0: Apply jump set jump property to 30
then
if jump min:2 max:30-----------and------------add -1 to jump
if jump=1 -----------and-----------jump=0
Ray positive---------/
The advantage here is you can play a animation using the property jump, and it will hold the last frame until you hit the ground,
if jump changed -------and(order hack)-----------JumpProp =30-jump
if jump changed-----------and------------action Jump
Also, you can use 'If jump==0" for other logic.