public enum INPUT_TYPE { PointAndClick, Directional, FollowPointer, PointClickOrFollowPointer, SideScrollX, SideScrollZ, TankControl } protected virtual void UpdateInputPointClickOrFollowPointer() { if (!this.IsControllable()) return; this.UpdateUIConstraints(); if (Input.GetMouseButton((int)this.mouseButtonMove) && !this.uiConstrained) { this.UpdateInputFollowPointer(); } else if (Input.GetMouseButtonUp((int)this.mouseButtonMove) && !this.uiConstrained) { Camera maincam = this.GetMainCamera(); if (maincam == null) return; Ray cameraRay = maincam.ScreenPointToRay(Input.mousePosition); this.characterLocomotion.SetTarget(cameraRay, this.mouseLayerMask, null, 0f, null); } }