I want to rotate the wheels of a car in two directions, up when the car is moving forward and when it's moving in the left/right direction. But, when I'm try to move the wheels after rotate left/right, the rotation still apllys in the up direction, creating a strange circular movement. I did using
// to rotate in the Y axis
if (keyboard.pressed("left")) {
wheel.rotation.y -= 0.01
}
if (keyboard.pressed("up")) {
// to rotate in the X axis
wheel.rotation.x -= 50
}
It may sound silly, but have you tried using the 'z' axis instead of the 'y'?