示例#1
0
        private void InitBodyMimic(VRObjectMimic vrCamera, VRObjectMimic cameraRigMimic, int hapticLayer = NSManager.HAPTIC_LAYER)
        {
            Camera playerCameraToHideBodyFrom = vrCamera.ObjectToMimic.GetComponent <Camera>();

            ActiveBodyMimic = BodyMimic.Initialize(playerCameraToHideBodyFrom, cameraRigMimic, hapticLayer);
            HardlightSuit.Find().SetColliderState();
        }
示例#2
0
        void Awake()
        {
            //This sets up a base body. It hands in the camera so the body follows/mimics the likely movements of the user. It also hides the body from the camera (since the body is by default on layer 31)
            VRMimic.Initialize(targetCamera.gameObject);

            //Hold onto a reference to the suit. Gives us access to a variety of helper functions.
            suit = HardlightSuit.Find();
        }
示例#3
0
        public void SetArmColliderAreaFlags()
        {
            //Set our colliders to use the correct side.
            Forearm.regionID  = WhichArm == ArmSide.Left ? AreaFlag.Forearm_Left : AreaFlag.Forearm_Right;
            UpperArm.regionID = WhichArm == ArmSide.Left ? AreaFlag.Upper_Arm_Left : AreaFlag.Upper_Arm_Right;

            //Add the arms to the suit themselves
            HardlightSuit.Find().ModifyValidRegions(Forearm.regionID, Forearm.gameObject, Forearm);
            HardlightSuit.Find().ModifyValidRegions(UpperArm.regionID, UpperArm.gameObject, UpperArm);
        }