- glm::vec3 vel;
- if (right && !left) {
- vel.x = config.move_velocity;
- } else if (left && !right) {
- vel.x = -config.move_velocity;
- }
- if (up && !down) {
- vel.y = config.move_velocity;
- } else if (down && !up) {
- vel.y = -config.move_velocity;
- }
- if (back && !front) {
- vel.z = config.move_velocity;
- } else if (front && !back) {
- vel.z = -config.move_velocity;
- }
- ctrl.Velocity(vel);