public void Aim(float aimHorizontal, float aimVertical, float moveHorizontal, float moveVertical) { Vector3 toAim = new Vector3(aimHorizontal, aimVertical, 0); if (toAim == Vector3.zero) { aimHorizontal = moveHorizontal; aimVertical = moveVertical; toAim = new Vector3(aimHorizontal, aimVertical, 0); } toAim.Normalize(); if (toAim != Vector3.zero) { float step = rotateSpeed * Time.deltaTime; Vector3 newAim = Vector3.RotateTowards(transform.forward, toAim, step, 0.0F); //TODO: Comment on how below line works arrowComponent.transform.rotation = Quaternion.LookRotation(Vector3.forward, newAim) * Quaternion.Euler(0, 0, 90); } animationComponent.AimAnimation(aimHorizontal, aimVertical, Quaternion.identity); }