Making a character Jump

Hi everyone,

I’m doing a quick GE test and I want to implement jumping. Is there a way (using only logic bricks) that will allow my character to fall after a certain height or time in the air is reached, or to make the force/velocity setter only fire once?

Thanks in advance!


Add a motion sensor and apply an upward LinV force when a ray sensor detects the ground.

i would give the floor a property and make it so both a collision sensor(with the floor) and your jump button have to be pressed to give your guy the upward motion

to do that you have to connect both sensors to the middle logic brick (haha i forgot what they are called) and have that one go out to your motion actuator

you will probably need to set your +z motion higher though since it will only be used for the time your guy is still touching the ground

Wow, thanks for the quick replies. I’ll try these out.


It’s a touch sensor…

On the object that you want to do the jumping…
Tie it to material that is covering the floor in the touch sensor brick, like MA:Material.001
Then put it on an AND controller
and a +Z actuator. I would apply it to Force, not dLoc.

You add that touch sensor to your keyboard input or whatever, and tie them both to the same AND controller.
Else… your character will do its jump everytime it hits that floor material…

You can play around with how much force to apply to +Z to make the jump be the right height. You can also adjust how fast gravity accelerates objects in your world.

I wouldn’t use the touch sensor with the material, because if you want floors with different textures, like carpet and then wood, then metal, you would have to create separate touch sensors for each material. Better would be to use a floor property, rather than the material in Touch (Is property in the Touch or Collision sensor?) , and assign that property to all of the floors.

joeman, a material would actualy be better because otherwise all of your floors have to be sepperate from your walls and everything else, and the material touch sensor doesn’t use the image you have on something, but the materials you asign in the edit tab( i think) right next to the vertex groups

ok kukanani here a simple example with python and shadow
velocity: up cursor
jump: space
Good luck

Always nice little scripts POCHO
Thank you for sharing!

You don’t NEED to use a touch sensor, you can use a ray. I’m not sure, but i think it consumes less fps.