Character Control Problems
dmilinovichiii
Member Posts: 620
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
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!)