Changed camera movement to right click
This commit is contained in:
parent
0ade17a3c8
commit
886370b230
1 changed files with 2 additions and 4 deletions
|
|
@ -5,7 +5,6 @@ public class PlayerController : MonoBehaviour
|
|||
{
|
||||
private Vector3 _lastMousePosition;
|
||||
private Camera _camera;
|
||||
private bool _canMove;
|
||||
private int _zoomScale = 2;
|
||||
|
||||
private void Start() {
|
||||
|
|
@ -31,13 +30,12 @@ public class PlayerController : MonoBehaviour
|
|||
}
|
||||
|
||||
private void CheckMovementInput() {
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
if (Input.GetMouseButtonDown(1))
|
||||
{
|
||||
_lastMousePosition = Input.mousePosition;
|
||||
_canMove = !IsMouseOverUI();
|
||||
}
|
||||
|
||||
if (!Input.GetMouseButton(0) || !_canMove) return;
|
||||
if (!Input.GetMouseButton(1)) return;
|
||||
|
||||
Vector3 mouseWorldPoint = _camera.ScreenToWorldPoint(Input.mousePosition);
|
||||
Vector3 lastWorldPoint = _camera.ScreenToWorldPoint(_lastMousePosition);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue