Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

How to fix player randomly stopping while moving?

edited June 2018 in How To
Hey I'm Sero I'm new to Flowlab. I want to make a RPG I'm currently just trying to learn how to get all the core mechanics working but I've noticed on my sprite when I make it move it will stop moving making it not spooth is there an easy fix? Heres my current project:

edit: I fixed it :)


  • edited June 2018
    it's because your attempted fix for the 'continued velocity' thing (where you continue moving when the key isn't pressed) isn't axis-specific and also doesn't take into consideration whether other keys are still being pressed

    you have the WASD keys set so when they keyup 0 is output to velocity x and y, this means for example when moving diagonally holding both W and D, releasing D will completely stop you instead of simply transitioning to moving up as W is still being pressed

    use this instead
    larger picture

    there are many ways to fix your problem but for simple top-down movement this one is decent
  • Thanks but I figured out I just needed to make the keys repeat.
Sign In or Register to comment.

| make games in your browser
@ 2017, All rights reserved.

Contact us

Get In Touch