コード例 #1
0
ファイル: VRTK_BodyPhysics.cs プロジェクト: zinkins/VRTK
 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);
     }
 }
コード例 #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();
 }
コード例 #3
0
ファイル: VRTK_BodyPhysics.cs プロジェクト: burnedikt/VRTK
 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();
 }