/// <summary> /// Reset all necessary parameters when RATS are no longer pointing at an object. /// </summary> private void RayExit() { if (!lastHit) { return; } lastHit.RayExit(); lastHit = null; oldLastHit = null; materialUpdated = false; // isMoving = false; Time.timeScale = 1; }
private void RayExit() { if (!lastHit) { return; } // Debug.Log("RayExit"); lastHit.RayExit(); lastHit = null; oldLastHit.ResetMat(); oldLastHit = null; materialUpdated = false; wasClicked = false; }