// Character Controller - WASD
agk::Move3DPhysicsCharacterController(playerCharacterController, 0, 0); // Stops Character Controller from the previous calculation basically unpressing the walk key
// direction - 0 = stop, 1 = forward, 2 = backward, 3 = strafe left, 4 = strafe right;
if (agk::GetRawKeyState(87)) { agk::Move3DPhysicsCharacterController(playerCharacterController, 1, cam_speed * 25); } // w
if (agk::GetRawKeyState(83)) { agk::Move3DPhysicsCharacterController(playerCharacterController, 2, cam_speed * 25); } // a
// Left and right
if (agk::GetRawKeyState(65)) { agk::Move3DPhysicsCharacterController(playerCharacterController, 3, cam_speed * 25); } // a
if (agk::GetRawKeyState(68)) { agk::Move3DPhysicsCharacterController(playerCharacterController, 4, cam_speed * 25); } // d
This is my code for tier 2 tier 1 is pretty much the same just differently written. What im trying to achieve is to walk in 2 directions at the same time, for example forward and to the left.
The way the code works is that the most recent line get executed so if i hold w and a i will walk to the left since the walk forward line gets overwritten with walk to the left.
Is there some way to execute 2 lines at once and walk left and forward at the same time?