// Deactivate Movement on Active Mover. private void StopMoving(bool flagForce = false) { if (flagForce) { // Deactivate all movables - overkill, since we already have active one. this.movables = FindObjectsOfType <Interactible_Movable>(); foreach (Interactible_Movable movable in this.movables) { movable.StopMoving(); } this.activeMovable = null; } else if (this.activeMovable != null) { this.activeMovable.StopMoving(); this.activeMovable = null; } }
// Extract information about cursor hit info. private void ExtractClickInfo() { // If clicked on scanned mesh - stop placment if ((this.activePlaceable != null) && (this.flagHitGaze && ObjectManager.instance.CheckEnvironmentObject(this.hitGaze.transform.gameObject))) { #if DEBUG Debug.Log("Interaction Manager: Click On Scan Mesh"); #endif TryStopPlacing(); } else { // Find interactibles if any. if (this.flagHitGaze) { this.activePlaceable = CheckPlaceableHit(this.hitGaze.transform.gameObject); } if (this.flagHitSelect) { this.activeMovable = CheckMovableHit(this.hitSelect.transform.gameObject); } } }