Exemplo n.º 1
0
 protected virtual void SetupPlayArea()
 {
     playArea = VRTK_DeviceFinder.PlayAreaTransform();
     if (playArea != null)
     {
         lastPlayAreaPosition = playArea.position;
         collisionTracker     = playArea.GetComponent <VRTK_CollisionTracker>();
         if (collisionTracker == null)
         {
             collisionTracker = playArea.gameObject.AddComponent <VRTK_CollisionTracker>();
         }
         ManageCollisionListeners(true);
     }
 }
Exemplo n.º 2
0
 protected override void OnEnable()
 {
     base.OnEnable();
     playArea = VRTK_DeviceFinder.PlayAreaTransform();
     headset  = VRTK_DeviceFinder.HeadsetTransform();
     if (playArea)
     {
         lastPlayAreaPosition = playArea.position;
         collisionTracker     = playArea.GetComponent <VRTK_CollisionTracker>();
         if (collisionTracker == null)
         {
             collisionTracker = playArea.gameObject.AddComponent <VRTK_CollisionTracker>();
         }
         ManageCollisionListeners(true);
     }
     if (headset)
     {
         currentStandingPosition = new Vector2(headset.position.x, headset.position.z);
     }
     EnableDropToFloor();
     EnableBodyPhysics();
 }
Exemplo n.º 3
0
 protected override void OnEnable()
 {
     base.OnEnable();
     playArea = VRTK_DeviceFinder.PlayAreaTransform();
     headset  = VRTK_DeviceFinder.HeadsetTransform();
     if (playArea)
     {
         lastPlayAreaPosition = playArea.position;
         collisionTracker     = playArea.GetComponent <VRTK_CollisionTracker>();
         if (collisionTracker == null)
         {
             collisionTracker = playArea.gameObject.AddComponent <VRTK_CollisionTracker>();
         }
         ManageCollisionListeners(true);
     }
     if (headset)
     {
         currentStandingPosition = new Vector2(headset.position.x, headset.position.z);
     }
     footColliderContainerNameCheck = VRTK_SharedMethods.GenerateVRTKObjectName(true, FOOT_COLLIDER_CONTAINER_NAME);
     EnableDropToFloor();
     EnableBodyPhysics();
 }