Variable jumping

scribblstudiosscribblstudios Member Posts: 118
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

Answers

  • v00d0v00d0 Member Posts: 143
    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 Member Posts: 118
    Also, I tried interpolating the Y velocity to 0 in midair. It doesn't work.
  • scribblstudiosscribblstudios Member Posts: 118
    Ok, trying that now.
  • scribblstudiosscribblstudios Member Posts: 118
    That works, but my actor seems to aggressively jerk down at the top of the jump.
  • scribblstudiosscribblstudios Member Posts: 118
    Sorry, didn't refresh :D
Sign In or Register to comment.