private void RayExit() { if (!lastHit) { return; } // Debug.Log("RayExit"); lastHit.RayExit(); lastHit = null; oldLastHit.ResetMat(); oldLastHit = null; materialUpdated = false; wasClicked = false; }
/// <summary> /// Ensure that outline doesn't stay on when moving between objects /// </summary> private void RayChanged() { if (!oldLastHit) { return; } oldLastHit.ResetMat(); oldLastHit = lastHit; materialUpdated = false; }