Disable movement during jump?

ArtesupremeArtesupreme Member Posts: 1
edited November -1 in Working with GS (Mac)
I have an actor / player that can move left and right and jump. However, is it possible to disable the left & right movement rules while the actor is jumping? Any suggestions how to do so?

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Set an attribute that signifies when you are jumping. In your rules that check if you are pressing the keys that enable you to run the behaviors that move you left and right, add the condition to check if the attribute signifying that you are jumping is false.
  • bladeolsonbladeolson Member Posts: 295
    I am trying to implement something similar to this. My character jumps and moves left and right. It feels unatural when for example he is running to the right then jumps, then in mid air you hit LEFT and he magically jumps to the left.

    If I disable movement left and right while jumping, won't that make my character only able to jump up and down and not get a nice arcing jump?

    blade
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    you should be fine if you use accelerate. the other ones will likely be more unnatural.

    may want to also set the max speed to keep from accelerating out of control
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    I was able to get a pretty smooth jump with a timer that moved up really fast for only about .8 seconds then after used a small amount of move down.

    It stayed smooth and the move down got rid of that "floaty" feeling

    The problem i find is that the amount of move up to break gravity just doesn't feel right coming back down with gravity alone. So if you add more gravity it just makes you go up less and your back where you started. the move down really helped.

    Ill upload a demo soon. Kind of unorthodox but i think it ended up feeling pretty nice
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    sounds interesting!
  • bladeolsonbladeolson Member Posts: 295
    James, I would love to see that demo. I am really trying to get something that feels right , seems key to me for any game with jumping
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Did anyone have any luck with this? Seems like it should be a simple thing to do but I can't find any answers.
Sign In or Register to comment.