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); } }
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(); }
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(); }