Making Actor Slide in One Direction and Slow Down

EMPW09EMPW09 Member Posts: 15

Working on an iPhone app where the main actor will dodge objects at the press of a button. How do I make it so that after one button press, the actor will move in one direction and slowly come to a stop?

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    Set the moving actor's drag (under the physics tag) to 400.

    When key is pressed : change velocity to 300.

  • EMPW09EMPW09 Member Posts: 15
    edited July 2014

    @Socks said:
    Set the moving actor's drag (under the physics tag) to 400.

    When key is pressed : change velocity to 300.

  • EMPW09EMPW09 Member Posts: 15

    Thank you @Socks !!!

  • SocksSocks London, UK.Member Posts: 12,822

    @EMPW09 said:
    Thank you Socks !!!

    Obviously you can play around with those two values to control how far it slides and how fast it slows down.

Sign In or Register to comment.