Flipping Character's Horizontal Speed

Discussion in 'How Can I...?' started by andrewtidey, Oct 3, 2015.

  1. andrewtidey

    andrewtidey Boxer

    Joined:
    Oct 3, 2015
    Messages:
    2
    Likes Received:
    0
    So I'm trying to make a game where the player's horizontal speed is flipped on a touch. So you're moving along to the right, player clicks, it changes the direction to the left. This feels like it should be easy to achieve but has proven to be extremely hard.

    If someone knows how to do this similarly but where the player collides into an object and flips that would work as well.

    Thanks alot! :)
     
  2. stevinz

    stevinz Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    169
    Likes Received:
    142
    I posted this is another thread as well, but...

    There is no default way built into build box, other the using the move left and move right buttons. One trick is to use two gameplay action buttons and take advantage of gravity. Have the left button change the gravity to a -x value, pulling the character to the left. And the right button change gravity to a positive x value, pulling the character back to the right. You may have to play with some other settings as well to get it working nicely.
     

Share This Page