Character Control Problems

dmilinovichiiidmilinovichiii Member Posts: 620
edited November -1 in Tech Support
I'm trying to create movement of a character using onscreen touch controls. When I first attempted this, I had the problem of having to lift my finger before I touched the other arrow to change direction, but I managed to fix this. Unfortunately, this caused another problem. When I released the arrow, my character continued moving. On top of all of this, I can't get the actor to move while falling without loosing all momentum because I want the character to move like how it would move with the move attribute and not the accelerate attribute. Does anyone know how to fix this? I don't have a PhD in math so if it requires advanced math can you please dummy it down for me?

Comments

  • dmilinovichiiidmilinovichiii Member Posts: 620
    Anyone?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    You have to use accelerate but here's how to make it feel like move:

    Rule - When game.GoRight is true
    -----Rule - when self.LinearMotionX is < 200 (change this value to whatever)
    ---------Accelerate (0 to scene at a VERY HIGH rate - 2000 or so)

    Rule - When game.GoLeft is true
    -----Rule - self.LinearMotionX is > -200
    ---------Accelerate (180 to scene at a VERY HIGH rate - 2000 or so)

    Then play with drag and friction (VERY IMPORTANT!)
  • dmilinovichiiidmilinovichiii Member Posts: 620
    Thanks a lot. This is a big help.
Sign In or Register to comment.