I want to move the object forward, depending on what angle it collides with, in this case itβs a tank. So what I want to do is:
When I press W, the tank should move forward.
When I press A or D, it rotates a corner.
While I can turn the corner, but I have no idea how to make the tank move forward. I have tried such things.
if (key.IsKeyDown(Keys.W)) { TankPos.Y = TankPos.Y - 4; }
But of course, this only makes it rise, regardless of the angle. Any simple solution?
source share