Tap screen faster to make actor move faster

Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

Hi everyone, i have an actor and i want it to move faster when you tap the screen faster. Anyone have any ideas on how to do this?

Thanks.

Comments

  • ArmellineArmelline Member, PRO Posts: 5,421

    What happens if you don't tap the screen? Does it slow down?

    What direction is it moving in?

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    @Armelline said:
    What happens if you don't tap the screen? Does it slow down?

    What direction is it moving in?

    Hi Armelline, thanks for the response, the actor stops moving when you don't tap the screen. Also its moving to the right.

  • ArmellineArmelline Member, PRO Posts: 5,421

    In that case, have every tap increase the motion.linear velocity.x by a set amount, perhaps 10.

    When you stop tapping, reduce the speed using the game attribute. An interpolate to 0 is probably going to be best, but it depends on how you want the actor to slow down.

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    @Armelline said:
    In that case, have every tap increase the motion.linear velocity.x by a set amount, perhaps 10.

    When you stop tapping, reduce the speed using the game attribute. An interpolate to 0 is probably going to be best, but it depends on how you want the actor to slow down.

    Hi im a little confused on the first bit you said. What rule would i need to do for every tap?

    Thanks.

  • ArmellineArmelline Member, PRO Posts: 5,421

    Maybe try something like this.

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    @Armelline said:
    Maybe try something like this.

    Nice one! Thankyou for that Armelline, one question if i wanted it to move up instead of right, would i simply need to change the linear velocity to y, instead of x?

    Thanks.

  • ArmellineArmelline Member, PRO Posts: 5,421

    @Thor said:
    if i wanted it to move up instead of right, would i simply need to change the linear velocity to y, instead of x?

    Yes. Left is x, but -100 etc. instead of 100. Y is 100 etc. for up, -100 etc. for down.

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    @Armelline said:

    Ok, thanks.

Sign In or Register to comment.