Exemplo n.º 1
0
 public void Init(VRCamera owner)
 {
     _owner       = owner;
     _camera      = GetComponent <Camera>();
     _bounds      = new VRTextureBounds_t();
     _bounds.uMin = 0.0f;
     _bounds.uMax = 1.0f;
     _bounds.vMin = 1.0f; // flip the vertical coordinate for some reason (no idea why but they did it in kerbal vr so im doing it too)
     _bounds.vMax = 0.0f;
 }
Exemplo n.º 2
0
        void Awake()
        {
            Head = new GameObject("Head").AddComponent <VRCamera>();
            Head.transform.parent = transform;

            LeftController = new GameObject("LeftController").AddComponent <VRController>();
            LeftController.transform.parent = transform;
            LeftController.NodeType         = VRNodeType.LeftHand;

            RightController = new GameObject("RightController").AddComponent <VRController>();
            RightController.transform.parent = transform;
            RightController.NodeType         = VRNodeType.RightHand;
        }