Rotation note

always rotate

    transform.Rotate(new Vector3(0, 0, 1),Space.World);
    transform.Rotate(new Vector3(0, 0, 0.2f);

rotation

    Quaternion rotationC = objectC.localRotation;
    Vector3 rotC = rotationC.eulerAngles;

    rotC.z = -heading;

???

 gameObject.transform.Rotate(new Vector3(0,1,0),Input.GetAxis("Horizontal");

Guess you like

Origin blog.csdn.net/MikeW138/article/details/87939435
Recommended