- Home /
Question by
SuperMage_03 · Apr 20, 2020 at 08:55 AM ·
rotate objectrotatearoundlocalrotation
How do I rotate up down and left right at rthe same time?
My code so far only does up down.
void LateUpdate()
{
transform.position = player.position - offset * currentZoom;
transform.localRotation = Quaternion.AngleAxis(currentYaw.x, Vector3.up);
transform.localRotation = Quaternion.AngleAxis(-currentYaw.y, Vector3.right);
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612231927im_/https://answers.unity.com/themes/thub/images/avi.jpg)