How do ninja jump controls?

Amir_nflAmir_nfl Member, PRO Posts: 5

How would i do ninja jump controls. i want to tap the screen so the player can bounce left and right. when i tap the screen it only moves right and some times left.
.

Comments

  • wirelesstkdwirelesstkd Member Posts: 75
    edited July 2014

    I'm very new myself, so this could be wrong, but here are my thoughts. If you're making a Ninjump like game, the actor is likely going to remain fixed on the Y axis and just move between two fixed points on the X axis. So I'd I'd do this:

    Constrain self.position.Y to (whatever).

    If: self.position.X = (something)
    Do: interpolate self.position.X to (something else)

    If: self.position.X = (something else)
    Do: interpolate self.position.X to (something)

    "Something" and "something else" represent the to X coordinates you want him to move between.

    Again - I could be very wrong and that may not work, but it's how is start. If I'm wrong, someone please correct me :)

Sign In or Register to comment.