I'm creating a Vr-world with unity for the OculusGo. I'm using the OVR CameraRig and the Oculus utilities. I have a Model that is rotating by the following script:
public class rotation_2 : MonoBehaviour
{
public bool _shouldRotate = true;
void Update()
{
if (_shouldRotate)
transform.Rotate(new Vector3(0, Time.deltaTime * 8, 0));
}
void OnMouseDown()
{
if (_shouldRotate)
_shouldRotate = false;
}
}
Right now tho model rotates and stops rotating when the Mousebutton is pressed. It should continue rotating when the Mousebutton is released - but it doesn't. Why?
In the next step i Want to change from the Mouse to the OculusGo-controller. So it's not the Mousebutton that causes the "rotation-stop" but the OculusGo-controller.
Thank You and Merry Christmas!