// Use this for initialization void Start() { Debug.Log(Time.timeScale); raycastScript = GameObject.Find("MainCamera").GetComponent <VREyeRaycaster>(); updateRate = 0.5f; speed2 = speed - 1; if (arduinoConnected) { fan = new Arduino(comPort); fan.Start(); } collisionCount = 0; //Assumes player does not start in a collision speedEffect = null; //Ensures speedEffect is initialised to null }
void Awake() { vrItem = GetComponent <VRInteractiveItem>(); vrEyeRaycaster = FindObjectOfType <VREyeRaycaster>(); if (vrEyeRaycaster == null) { Debug.LogError("no EyeRaycaster found."); } playerCtrl = FindObjectOfType <PlayerFreeTeleportController>(); if (playerCtrl == null) { Debug.LogError("no PlayerFreeTeleportController found."); } }
public void Init() { if (mVRInput == null) { mVRInput = gameObject.AddComponent <VRInput>(); } if (mVREyeRaycaster == null) { mVREyeRaycaster = gameObject.AddComponent <VREyeRaycaster>(); } if (mVRRecenter == null) { mVRRecenter = gameObject.AddComponent <VRRecenter>(); } mVREyeRaycaster.InitInput(mVRInput); SetupVR(); }
void Start() { // grab a reference to the SteamVR teleporter Component if (theTeleporterComponent == null) { if (GetComponent <SteamVR_Teleporter>()) { theTeleporterComponent = GetComponent <SteamVR_Teleporter>(); } } // grab a reference to the eye raycaster to find out what we're looking at if (eyecaster == null) { if (GetComponent <VREyeRaycaster>()) { eyecaster = GetComponent <VREyeRaycaster>(); } } }
void Awake() { // get vr interactive item component vrItem = GetComponent <VRInteractiveItem>(); // get vr eye raycaster vrEyeRaycaster = FindObjectOfType <VREyeRaycaster>(); if (vrEyeRaycaster == null) { Debug.LogError("No VR Eye Raycaster found in the scene."); } playerController = FindObjectOfType <PlayerFreeTeleportController>(); if (playerController == null) { Debug.LogError("No Player Free Teleport Controller found in the scene."); } }
void Awake() { // get interactive vr item component vrItem = GetComponent <VRInteractiveItem>(); // get vr eye rascaster vrEyeRaycaster = FindObjectOfType <VREyeRaycaster>(); if (vrEyeRaycaster == null) { Debug.LogError("There needs to be a VR Eye Raster in the scene"); } // get player free teleport controller playerCtrl = FindObjectOfType <PlayerFreeTeleportController>(); if (playerCtrl == null) { Debug.LogError("There needs to be a PlayerFreeTeleportController in the scene"); } }
// Use this for initialization void Start() { mPlayerCamera = GameObject.Find("MainCamera"); if (mPlayerCamera != null) { mEyeRaycaster = mPlayerCamera.GetComponent <VREyeRaycaster>(); if (mEyeRaycaster == null) { Debug.Log("FATAL ERROR ! EYE RAYCASTER NOT FOUND !"); } } else { Debug.Log("FATAL ERROR ! PLAYER CAMERA NOT FOUND !"); } mSpawnableComponent = GetComponent <Spawnable>(); if (mSpawnableComponent == null) { Debug.Log("FATAL ERROR! No spawnable component attached."); } }