Reversed Movement

I have rewatched the videos and matched my code with the code on github and all seems to match. My movement is reversed when I set it to -1. Works correctly when 1 but then the map bounds are backwards and only allows going off the map. Where else could I look for a solution to this?

Hi Dukie,

Can you show me your code as it is now? I can help you identify the issue.


Screenshot (4)

Thanks for responding and trying to help!

1 Like

I’m not seeing the immediate problem, can you help me out by submitting your project through this form?

I can test your project here and debug the problem more directly.

1 Like

Thanks Dukie,

After a closer look, I found you’re using Vector2Subtract instead of Vector2Add. Which would certainly result in a reversal of outputs and thus, controls.

1 Like

Thank you, that was the issue. Truly appreciate your time!

1 Like

Welcome to GameDev Community!

Just a hint:

It will be much easier for people to help you if you copy/paste your code in a Blockquote.

To do this, you can either click the " icon or you can use the > (greater than symbol) at the beginning of a line.

Paste your code in here to make it easier for everyone to read.
Some people read this forum on a mobile device and…
…will have no chance of reading your code properly.
You’ll be able to get help more quickly if you do this.
Screenshots of code are are often difficult to read…
…especially if you’re posting a large portion of your code.
Blockquote is better.
You get the idea.

It will look like this in your draft:

Like meow

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms