Movement code in C# works on wrong axis.
Greetings! I'm very new to Unity2D and I'm making a small game as an assignment to get to a Uni, but I cannot code at all, so I'm limited to tutorials and I only have 12 days left to complete it and have been stuck for DAYS on this problem;
So I have a 2D Player Object, a spaceship, that I want to move forward while holding W, backwards with S and rotate with the A and D keys (and their arrow counterparts). The A and D triggers work as intended - the ship rotates along it's Z Axis, but the "Vertical" Axis triggers make it sidestrafe to left and right, instead of it moving forward and backwards.
The best thing; it moves in the correct direction, until I add the rotation. I have already tried two ways of scripting the movement, but both had the same issue. I think it may not be the script itself, so I have decided to use the one from the following YouTube tutorial;
https://www.youtube.com/watch?v=f0GYxSmw328&ab_channel=quill18creates
Any fix for this? I just want to head in the correct direction.
Your answer
Follow this Question
Related Questions
fly movement 0 Answers
Complicated level change problem 1 Answer
Why isn't my player moving down? 0 Answers
GoogleVR / C# - How to, with the "pointer click": click 1 move a cube and click 2 move back the cube 0 Answers
Stop movement on collision 1 Answer