Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Avascar on November 27, 2012, 10:59:22 PM
-
Apperently I have a problem here, when I have my player jump (he jumps fine btw, collision wise and everything) it jumps fine, however the gravity is a bit weird. I set the gravity Y to -50 (so the fall won't be so floaty) and the time scale to 2 (the player used to jump up like the moon). But the thing I'm having is that I have problems landing. If I hold the Up arrow he'll jump continuiously, up and down just fine. However if I let go he immedietly falls down due to the gravity. How can I have the player jump up and down at a constant rate without letting go of the Up arrow?
Sorry for my English btw >< Anyway, to put it in basic terms, I want like a Mario jump but since I let go of the Up arrow when he's at his highest he should fall down the same speed as jumping up. If I keep holding the up button that'll do just it but I don't want to do that, if I let go of the Up arrow at its highest point he'll jump down instantly (The gravity is at -50)
In more basic terms, how do I script a proper jump?
-
hi,
It looks to me as you've lost yourself in physics settings. Maybe you have a drag value to high, Modifying the gravity is generaly a sign that something is wrong elsewhere. Changing the time scale is even more of a desperate move, and certainly to be avoided just for a more realistic jump.
I am not sure I can make sense of what you are trying to achieve, can you rephrase? thanks.
bye,
Jean
-
Me: Holds the Up button
Player jumps at max height and falls correctly, but will keep doing that until let go.
^ That's fine
Me: Presses the Up Button
Player makes a slight jump
^ That's fine
(easier to imagine it in slow mo)
Me: Presses the Up button
Player jumps until reaching its max height (still in mid air)
Me: Lets go of the Up button
Player falls down faster than it should
^ That's not fine
I want the player to fall the same speed as he jumps, but when he doesn't jump and let's say he falls off a platform without jumping, I want him to fall faster (so I made the Gravity Y axis -50)
At first the jump was floaty, so I increased the speed so the player jumps up faster.
-
Hi,
I see, It's linked to how to make the player jumps, you are likely applying a force right? you have likely setup the physics to fall under the jumping force, where maybe the right approach would be only apply a jumping force.
Have a look at how I did it for the platform jumper:
The behavior implemented is really what you want I think, when the player touch the ground, you check of the jump input is on, and if so, jump again. Then it will all be simple and consistent.
bye,
Jean
-
Ok well, I added the rigid body, at first it spazzes out so I blocked all rotations, now it could only move X and Y (also disabled the Z axis movement). I replaced the Character Move with Add Force, put in the number 5 in the Y, but now it's not jumping anymore :? The gravity works fine and everything, but it won't jump ><
-
Hi,
you may very well have reseted its speed including the y axis which would result in a no jump.
bye,
Jean
-
Well how exactly would I fix that?
-
Hi,
Are you using the platform jumper example as a base?
bye,
Jean
-
Nope, can't find it anywhere. But I managed to fix it (at least a tad bit), I'll just embrace this :P
-
Hi,
Sorry, I should have tell you the link:
https://hutonggames.fogbugz.com/default.asp?W880 (https://hutonggames.fogbugz.com/default.asp?W880)
https://hutonggames.fogbugz.com/default.asp?W890
bye,
Jean