Rotation problem
i have a plane object and it's horizontal line . There is a paren-child relation . i want to rotate the horizontal line with plane's roll movement . Problems are horizontal line is not rotating just one axis , i don't know how can i adjust plane and line exactly same rotation cause horizontal line should be an indicator . i read lots of solutions but i can't figure out problem. i tried these seperately :
transform.RotateAround(hl1.transform.position,transform.forward, 5);
transform.eulerAngles = new Vector3(hl1.transform.eulerAngles.x, hl1.transform.eulerAngles.y, rot);
transform.eulerAngles = new Vector3(0, 90, 0);
transform.rotation = Quaternion.Euler(hl1.transform.rotation.x,
transform.rotation.y, rot); // hl1 is just my object , not important
transform.Rotate(new Vector3(0, 0, 50));
none of them solved my problem . any help ?
robertbu
what i want is called "pitchladder" for plane hud . i want to rotate just one axis , object on picture is child of plane