Wazabee 3 Report post Posted March 7 Hola a tod@s, necesito ayuda. Necesito rotar la cámara con el ratón en el eje y y en el x, hasta ahí no he tenido muchos problemas. El tema es que necesito limitar la rotación en el eje x y no sé cómo hacerlo. El código que uso para la rotación es el siguiente: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Rotacion : MonoBehaviour { public float vHorizontal; public float vVertical; float rotH; float rotV; void Start () { } void Update () { rotH += vHorizontal * Input.GetAxis ("Mouse X"); rotV -= vVertical * Input.GetAxis ("Mouse Y"); transform.localEulerAngles = new Vector3(rotV, rotH, 0.0f); print(transform.localEulerAngles); } } Alguien puede echarme una mano por favor? Gracias Share this post Link to post Share on other sites