Axis rotation not correct on a 3D object

I got my 3d model for my car ( Black Snow (@BlackSnow02) - Sketchfab ps : he is doing high quality model) but the steering wheel axis are a bit strange because i used an other car is this one it actually worked very well I tryed modifing the rotations with variables in game and i noticed that there were 2 axis with the same rotation


This is the steering wheel that i try to rotate and this is the code :



void SteeringWheel()
    {
        if (steeringWheelAxis == SteeringWheelAxis.Z)
        {
            steeringWheel.transform.localRotation = Quaternion.Euler(steeringStartRo, steeringWheel.transform.rotation.y, currentSteeringWheelRotation);
        }

        else if (steeringWheelAxis == SteeringWheelAxis.Y)
        {
            steeringWheel.transform.localRotation = Quaternion.Euler(currentSteeringWheelRotation, steeringWheel.transform.rotation.y, steeringWheel.transform.rotation.z);
        }

        else if (steeringWheelAxis == SteeringWheelAxis.X)
        {
            steeringWheel.transform.localRotation = Quaternion.Euler(steeringStartRo, currentSteeringWheelRotation, steeringWheel.transform.rotation.z);
        }
        
    }

I did many try on differant axis with an enum

Thanks for any replys, if you need more information please informe me

Some things to check:

You may need extra parenting to sort out troublesome assets:

Check your pivot/center and global/local buttons in the Scene window in the editor.

Shortcut keys are Z and X to toggle those.

Hi,

Sorry for late reply, and thanks for the reply!

I tried that before, but this didn’t work and retried again,


I tried doing an empty object and the 3d model inside but it didn’t change anything,

In local axis I want my steering wheel goes on the Y axis but when I put it on Y it just rotates on the same axis than X and Z (btw the empty should rotate and not the object right (to be sure)),
and the center of rotation is on the middle.