playMaker

Author Topic: FPS Controller, Need a Jump!  (Read 3489 times)

FractalCore

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 100
FPS Controller, Need a Jump!
« on: June 30, 2011, 11:45:24 AM »
I'm having a go at creating my own FPS controller entirely with Playmaker (and the Character Controller). It's working really well so far. I have movement, mouse look, ducking, etc.

One thing I can't figure out is, the best Action for making the player jump. I've been using the Translate Action with a number in Y and set to per second. It works but is linear and feels all wrong. But I tried the itween actions and as many others as I could find and couldn't get anything better.

It seems to move the player up with a linear motion then drop with what looks like gravity (increasing speed). So seems to be halfway there. Also if I jump on to a raised surface it gives an extra little jump for some reason. Just weirdness I can't figure out.

Is this as simple as using one Action that can give the player a quick nudge upward then let them drop naturally, or does it require more in depth graphs. I found the Curve Actions which seem like the way to go but couldn't make them work. Any help would be great, thanks.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: FPS Controller, Need a Jump!
« Reply #1 on: June 30, 2011, 12:34:10 PM »
Hi

 try to use an animateFloat action: https://hutonggames.fogbugz.com/default.asp?W4 instead

 You get total control over the jump animation that way, and you don't need to involve complex systems. Else what exactly fails with the Curve float action. The best way to tackle this kind of weirdness, is to test the action on an empty scene with the bear minimum and play with the settings until you master it and understand it properly, then as you try to implement it to your character you will be in a better position to spot where problems are.

 Hope it helps,

FractalCore

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 100
Re: FPS Controller, Need a Jump!
« Reply #2 on: June 30, 2011, 10:25:11 PM »
Thanks for the help. I didn't see the Animate Float Action. Good to know about it, especially with the curve control.

I tried that and it worked, until I took the player up hill then it forced me back down to that height. In other words it got tricky to take the animating float value and send it to the Y float of the vector3 of the parent Player object.

I ended up going back to the iTweens and found iTween Move Add. That did it. It has the ease out control and can be done from any object and sent to the parent Player object, all in one Action.

Now all I'd like is to be able to control the XZ movement while in the air. But that's not really a problem, just a personal preference.

Thanks again.