How do you make a jump?

(SelfStudent) #1

I’d like to know how to make my game character jump.
I’d made the animation, now all I need to do is correspond it to
some proper game logic and physics. I’m not sure I know how to do it
right, so please help me.

Thank you. :slight_smile:

(z3r0 d) #2

umm, a motion actuator [global z axis linv in add mode pulsed once]… there isn’t a lot more to it than that.

(SelfStudent) #3

Okay, but I seem to be puzzled on one thing. When I set a value to linv
nothing happens? Am I using it right?


(::d20) #4

Try to see were to axis point at…

(SelfStudent) #5

Thanks, d20, but what I mean is that my character isn’t doing anything when I hit the assigned key . . .

The logic bricks are connected . . .

Maybe I’m not using the pulse mode right?

I’m rather stumped. Nothing’s happening.

I’m not sure I understand how to use the velocity functions. Hmmm, if they only control the velocity, then should there be something else along with it in the motion actuator?

(SelfStudent) #6

One more thing.

How does gravity work in the physics engine? How do I get my character to fall back down once she’s jumped? Thank you. :slight_smile:

(::d20) #7

Well… click in actor and dynamic button whith your “character” selected to make them sucetibile for gravity.
The gravity in GE is 9.8 for defoult, but you can change this as you wish…

(SelfStudent) #8

Thanks, d20! :stuck_out_tongue:

Um . . . now how do I get my character to stop from falling? lol


I don’t have a ground or background yet, so do I need one?

Thanks again :slight_smile: .

(Shn275) #9

Yes, and make sure the faces have collision turned on. Oh, and just in case if the character starts bouncing around, give the character and the floor each a material and then activate the button that has “DYN” on it. That should fix it.

(SelfStudent) #10

It works, but there seems to be something wrong. The character is standing some distance over the floor, like she’s levitating. Hmm, the center of the armature is where it’s supposed to be, between the character’s feet, but then again that probably isn’t it, since I have my character parented to a plane beneath her, and that’s supposed to make the contact witht he ground.

I think this is it: There seems to be an outlined circle around that plane, much like a the kind that appears around a lamp when “sphere” is selected. I don’t know how it got there. Can anyone tell me how to get rid of it?


Oh, also, how do you get the jump to only go when the key is first pressed? When I hold the key my character keeps going up, (Well there’s some gravity of course). I’m not sure I got the pulse thing right.

(MagicMan) #11

I think this is it: There seems to be an outlined circle around that plane, much like a the kind that appears around a lamp when “sphere” is selected. I don’t know how it got there. Can anyone tell me how to get rid of it?

You say its on your plane, as in the ground? You need to make the plane not dynamic. Anyway, heres some info on that sphere:

Thats your objects bounding sphere, it shows where collisions are calcualted for a dynamic object. The size can be adjusted by changing the size attribute on the physics tag. It is measured an equal distance from the objects center. Move all the objects vertices in edit mode so the bottom of the sphere is at the bottom of the object.

You dont need to parent the character to the ground; set to dynamic and using the physics engine, the character will be kept down by gravity.

Jumping may require a bit of a complicated set of logic bricks and properties, but I havent figured out the best way to set this up right.

(SelfStudent) #12

Heheh . . .

Actually the plane I referred to isn’t the ground. :slight_smile: My character is sort of standing on an invisible square that doesn’t appear in the game. The character is parented to that plane to help her move around, I was experiencing too much disorder and confusion and getting things right when I tried to have the character’s armature do the animations and the motion at the same time, so I split up the logic briks between the armature (for animations) and the plane (for motion). I know it seems kinda needless but it helps me keep track of all the logic bricks. :slight_smile:

yeah so the planes dynamic . . .

But then again, come to think of it, that might cause problems when my character becomes dynamic as well, since my character has to sustain damage . . . :-?

Hmmm, let me try and fix it.

(SelfStudent) #13

Wait a minute, a character doesn’t necessarily have to be dynamic to receive damage, right? That’s the collision and propertys’ job, right?

(SelfStudent) #14

Ok, one more thing, I promise. Lol

I’m using some properties in my jump, but I’m not sure I understand properties right. What I want is for my character to do is play a landing animation when she lands on the ground.

Maybe this can help me get an idea of how to use properties correctly. How exactly would I use properties–by that I mean which objects do I assign properties to and how they all interact-- to make the character play and landing animation when making contact witht the ground?

(Toomai) #15

Here’s what I would do: Give your dynamic object (plane or character) an integer property called “jump”. Set bricks so that when your dynamic is touching something (Touch sensor), the property is 0. When you press the jump key, then “jump” becomes 1. Set the landing animation to play when the characters touches something and “jump” is 1.

In other words: When you jump, “jump” says you’re in the air. When you touch ground and you’re in the air, you land.

(SelfStudent) #16

Thanks toonami, I’m working on it :slight_smile: .

Another problem. My character is fine and standing on the ground when the game starts, but after my character jumps she just falls right through the floor. :-?

What’s happening and how do I fix it?

Thanks guys, I really appreciate all the help.