Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Variable jumping

scribblstudiosscribblstudios Posts: 118Member
edited March 2012 in Working with GS (Mac)
I have a question about jumping. when I make my character jump, I change its Y velocity to 350. However, if the mouse is released before the end of the jump, I want the actor to come down sooner. Example: a tap on the mouse would trigger a small hop. Holding the mouse down would give you a long jump. Any ideas? Thanks!

Best Answer

  • v00d0v00d0 Posts: 143Member
    Accepted Answer
    i edited the post ...


  • v00d0v00d0 Posts: 143Member
    edited March 2012
    try to create a rule that change the velocity on mouse release, it should solve your problem. Basically is the same rule of the jump, with a diferrente Y position, a higer velocity, with mouse released and not pressed, and a actor position Y < then a certain Number; for example: If my actor jump 10 pixel high, if mouse is released before this number then do somthing..
  • scribblstudiosscribblstudios Posts: 118Member
    Also, I tried interpolating the Y velocity to 0 in midair. It doesn't work.
  • scribblstudiosscribblstudios Posts: 118Member
    Ok, trying that now.
  • scribblstudiosscribblstudios Posts: 118Member
    That works, but my actor seems to aggressively jerk down at the top of the jump.
  • scribblstudiosscribblstudios Posts: 118Member
    Sorry, didn't refresh :D
This discussion has been closed.