Character Freezes While Walking.

FallingBoxStudiosFallingBoxStudios Freelance Graphic DesignerMember Posts: 822
Hi, I was watching @jamie_c's video on double jumping/walking left and right, the walking works perfectly but after a couple seconds of walking in one straight line, the character slows down, until it stops, how can I make it work perfectly just like @jamie_c's version. Thanks.

image

Comments

  • -Timo--Timo- Member Posts: 2,313
    I had the same problem and I solved it by doing this
    rule bla bla bla...
    do
    every 0 seconds
    change attribute self.motion. linear velocity.X to something

    hope this helps :)
  • FallingBoxStudiosFallingBoxStudios Freelance Graphic Designer Member Posts: 822
    @timolapre1998 Umm, I'm sorry but I don't understand, do you mean:

    Create Timer: Every 0.2 seconds - Change attribute: self.linear velocity.x

    but change the self.linear velocity.x attribute to what?
  • -Timo--Timo- Member Posts: 2,313
    your probably using a rule like when key 'right arrow key' is pressed
    do
    timer: every 0 seconds (not 0.2)
    change attribute
    self.motion.linear velocity.x to something (lets say 200. you have to play with this a little but on how fast you want the player to move)
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    If you're going to be walking for a longer period of time using those rules you can do one of two things:

    1. Make sure your character and platforms don't have any friction to slow your player down.

    or

    2. Use a Constrain Attribute instead of the Change Attribute for setting the players movement speed left and right.

    Let me know if that makes sense to you or if you need a more detailed explanation.
  • FallingBoxStudiosFallingBoxStudios Freelance Graphic Designer Member Posts: 822
    @jamie_c Thank you so much! it worked :D
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    sweet! :)
  • -Timo--Timo- Member Posts: 2,313
    So thats what friction does :) nice to know, thanks :)
Sign In or Register to comment.