Hello,
I'm testing some scrolling experience, and I'm having an issue with the utter basics that is the velocity X.
I know the principals of using Velocity X and Y to move an object (or image) through eventing, however I seem to have an issue and I can't lay my finger on it.
So I thought the simpliest way to do this is to add a pos X and pos Y, then increment or decrement Velocity X base on player input, then update the position with that velocity.
Works wonders, however I need something to stop the player to move when no input is given, so I thought I'd use a switch to determine if the player is pressing something or not, when he is not, reverse the velocity untill it reach 0.
Now, this works just fine, except I can't move right anymore.
If I take the "NoInput" controller part away, I can move left or right just fine, so I'm guessing the issue is from the NoInput condition, but it works just fine when you are going left, but going right is impossible.
I tried different methods, but I can't seem to fix the issue of not being able to move right.
Anyone has an idea what I'm doing wrong?
I'm testing some scrolling experience, and I'm having an issue with the utter basics that is the velocity X.
I know the principals of using Velocity X and Y to move an object (or image) through eventing, however I seem to have an issue and I can't lay my finger on it.
So I thought the simpliest way to do this is to add a pos X and pos Y, then increment or decrement Velocity X base on player input, then update the position with that velocity.
Works wonders, however I need something to stop the player to move when no input is given, so I thought I'd use a switch to determine if the player is pressing something or not, when he is not, reverse the velocity untill it reach 0.
Now, this works just fine, except I can't move right anymore.
If I take the "NoInput" controller part away, I can move left or right just fine, so I'm guessing the issue is from the NoInput condition, but it works just fine when you are going left, but going right is impossible.
I tried different methods, but I can't seem to fix the issue of not being able to move right.
Anyone has an idea what I'm doing wrong?