switch mouse direction to move camera
This commit is contained in:
@@ -146,7 +146,7 @@ public class CameraSystem : MonoBehaviour
|
||||
private void HandleCameraMovement(Vector2 inputDir)
|
||||
{
|
||||
|
||||
Vector3 moveDir = transform.forward * inputDir.y + transform.right * inputDir.x;
|
||||
Vector3 moveDir = transform.forward * -inputDir.y + transform.right * -inputDir.x;
|
||||
transform.position += moveDir * _moveSpeed * Time.deltaTime;
|
||||
}
|
||||
|
||||
|
||||
@@ -140,6 +140,61 @@ public partial class @InputActions: IInputActionCollection2, IDisposable
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
},
|
||||
{
|
||||
""name"": ""JoystickMovement"",
|
||||
""id"": ""f9008d1f-75ee-4b4a-a98d-45206b88b557"",
|
||||
""path"": ""2DVector"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Move"",
|
||||
""isComposite"": true,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": ""up"",
|
||||
""id"": ""2162e77a-6f66-4396-9f4f-9b39efef2745"",
|
||||
""path"": ""<Gamepad>/leftStick/up"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Move"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
},
|
||||
{
|
||||
""name"": ""down"",
|
||||
""id"": ""da83e5f4-d2ed-4d99-ae7e-5f27f5e7406e"",
|
||||
""path"": ""<Gamepad>/leftStick/down"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Move"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
},
|
||||
{
|
||||
""name"": ""left"",
|
||||
""id"": ""267922e7-7a1e-471d-aad2-2346a6ad633c"",
|
||||
""path"": ""<Gamepad>/leftStick/left"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Move"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
},
|
||||
{
|
||||
""name"": ""right"",
|
||||
""id"": ""77cf4330-c504-4f80-81c7-33dd924ad7c7"",
|
||||
""path"": ""<Gamepad>/leftStick/right"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Move"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
},
|
||||
{
|
||||
""name"": ""One Modifier"",
|
||||
""id"": ""9e79ba5a-a365-470f-bd83-9f70fcf1ac4e"",
|
||||
|
||||
@@ -117,6 +117,61 @@
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "JoystickMovement",
|
||||
"id": "f9008d1f-75ee-4b4a-a98d-45206b88b557",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Move",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "2162e77a-6f66-4396-9f4f-9b39efef2745",
|
||||
"path": "<Gamepad>/leftStick/up",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "da83e5f4-d2ed-4d99-ae7e-5f27f5e7406e",
|
||||
"path": "<Gamepad>/leftStick/down",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "267922e7-7a1e-471d-aad2-2346a6ad633c",
|
||||
"path": "<Gamepad>/leftStick/left",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "77cf4330-c504-4f80-81c7-33dd924ad7c7",
|
||||
"path": "<Gamepad>/leftStick/right",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "One Modifier",
|
||||
"id": "9e79ba5a-a365-470f-bd83-9f70fcf1ac4e",
|
||||
|
||||
Reference in New Issue
Block a user