playMaker

Author Topic: Jumping and double jumping  (Read 4102 times)

cmart

  • Playmaker Newbie
  • *
  • Posts: 3
Jumping and double jumping
« on: July 10, 2012, 04:47:52 PM »
Hello all, I am new to playmaker but so far I am really enjoying it. I am having a bit of trouble though: for the life of me, I can't figure out how to get my character to jump.

Here is the deal: I have a simple first person controller set up with a character controller component through Unity, and A FSM that consists of get axis vector, simple controller, and a couple of mouse look actions. I tweaked all this, and I have a great feeling first person controller.

Trust me, before I decided to ask for help here I did my research. I found out how to use force to make rigid bodies "jump" but since I am using a character controller, physics don't apply.

I looked at the code for the included first person controller, but since I am not the best at coding (thats why I bought playmaker after all  :D) I couldn't figure out how to get a non rigid body to jump.

I would REALLY appreciate any help, as this a major roadblock holding up the development of the rest of my game.

Also if anyone has any tips on creating a double jump, that would be useful as well. I have a feeling I will be able to figure that out once I figure out how to get my character to jump at all, but I am all ears if there are any special considerations for building a double jump.


Thanks for any help! I will be checking this messageboard all day if any kind soul wants to help me out  :D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Jumping and double jumping
« Reply #1 on: July 11, 2012, 04:08:17 AM »
Hi,

 You simply need to to inject some value in the y axis that you use to move the controller. To move it on the ground you use x and z, to move it up, use the y.

 You can create an animation curve to define how the jump is ( with easing etc etc), or you can compute it with more dynamic behaviors, but basically, it's simply a matter to telling the controller to move up.

 use the "controller is grounded" action to know when the controller is on the ground or not ( for example as you go down after the jump, stop moving the controller once it's grounded)

 bye,

 Jean