0
$\begingroup$

I have a player (sphere) with Dynamic Physics and can move around with W, A, S, D. The space bar can make it jump. I have a Sensor, keyboard, that detects the spacebar press. I have two Actuators, one is a Simple Motion, and the other is a Constraint. The simple motion has a Linear Velocity Z value of .5, With the L and AD checked. The constraint is a Location constraint, and it's supposed to limt the height of the player jumping. It's along the Z axis, and has a min of 0 and max of .5. Damping is 13.

Whenever the space bar is pressed, the player jumps and continues to go up, ignoring the limit. Once the space bar is released, it gets some sort of boost and flies higher up and faster.

What do I need to fix in order to get an efficient jump mechanism? Or is there a better way to do this? I would like to be able to change the jump speed and height.

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

enter image description here

The constraint actuator dumping seems to only affect the aceleration of the object not the location as it says.

As your object physic is dynamic give it more mass than 1 and apply force over it with a keyboard sensor with tap option.

enter image description here

$\endgroup$
3
  • $\begingroup$ Can I also get rid of the double, triple, etc.. jump? EDIT: Sort of fixed. I added a Collision Sensor to the Actuator, but when you hold Spacebar, it only jumps once until you let go. $\endgroup$
    – RATIU5
    Commented Dec 22, 2017 at 0:57
  • $\begingroup$ Well, edit your question with the new info and i will be held to help you. Also explain exactly the behavior you want. $\endgroup$ Commented Dec 22, 2017 at 1:41
  • $\begingroup$ It will end up being a new question. Thanks for the current help! $\endgroup$
    – RATIU5
    Commented Dec 22, 2017 at 2:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .