Announcement

Collapse
No announcement yet.

Mobile button access

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mobile button access

    Hello everyone! I'm building iOS game similar to doodle jump where you have to jump on the platforms. Player has to use buttons to move left and right. These buttons work great but once when I press left button characters moves to left without stopping even if I release button. Same situation is with right button. Here's my kismet setup

    With this setup character doesn't want to move at all. If I disconnect Input not pressed node from set variable it moves but without stopping.

    #2
    Right now you're setting the float value to 0, but the pawn's velocity is still 400 because you never call Set Velocity again.

    Try running the Change Float's out to the Set Velocity's in so it gets an impulse when you release the input.

    Comment


      #3
      Originally posted by bwhit View Post
      Right now you're setting the float value to 0, but the pawn's velocity is still 400 because you never call Set Velocity again.

      Try running the Change Float's out to the Set Velocity's in so it gets an impulse when you release the input.
      Could you explain it better, I think I already tried something like that but it didn't work!

      Comment


        #4
        You have: Input Not Pressed > Change Float
        You need: Input Not Pressed > Change Float > Set Velocity (with the new float from Change Float node)

        Your pawn never stops because the velocity magnitude is never updated after the float is changed to 0. Just changing the float will not update the velocity - you need to do this.

        Then you'll need another Change Float to reset the magnitude to the desired magnitude so the button will work a second time.

        Input Pressed > Change Float to desired mag > Set Velocity (with new float value)

        Comment

        Working...
        X