Skip to content

Commit

Permalink
Rough camera controller
Browse files Browse the repository at this point in the history
Very rough camera controller using new Unity Input System.
  • Loading branch information
flyingghoti committed Jan 18, 2020
1 parent 4083158 commit b738044
Show file tree
Hide file tree
Showing 23 changed files with 1,669 additions and 1,725 deletions.
448 changes: 448 additions & 0 deletions Assets/Base Controls.cs

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

283 changes: 283 additions & 0 deletions Assets/Base Controls.inputactions
@@ -0,0 +1,283 @@
{
"name": "Base Controls",
"maps": [
{
"name": "Navigation",
"id": "d26b12bd-9fd4-41a1-9c11-a9c9d58afefe",
"actions": [
{
"name": "Movement",
"type": "PassThrough",
"id": "fae80b8c-2011-4601-8aaa-d26119a0ab98",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "Pointer Location",
"type": "PassThrough",
"id": "41da19f4-ab61-4ff5-8f7d-26c450a54d34",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "Pointer Delta",
"type": "PassThrough",
"id": "78be999b-4d64-421a-8da0-453a3bda976a",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "Orbit Shift",
"type": "Button",
"id": "00e3f3ab-f75b-4b9b-9f91-d5c561bc2601",
"expectedControlType": "Button",
"processors": "",
"interactions": "Press(behavior=2)"
}
],
"bindings": [
{
"name": "Arrow Keys",
"id": "9ff5b249-69d8-496a-8aff-9639961b6b0f",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Movement",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "7b10a8c1-6600-4308-9618-d922966f9da1",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard Only;Keyboard and Mouse",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "6d3b250a-6000-4bf3-b822-e196cc5fbccc",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard Only;Keyboard and Mouse",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "dcc55648-3ef7-492f-b88d-d8aec090ef39",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard Only;Keyboard and Mouse",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "f51b01ef-1397-4233-a5e3-0e1d77331a65",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard Only;Keyboard and Mouse",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Right Stick",
"id": "0aa8d82c-d5f5-47ec-8e83-95e8099b84a4",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Movement",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "810f221e-85a3-473a-bf16-71081eb537a9",
"path": "<Gamepad>/rightStick/up",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "b0a40874-21cd-422f-9bb6-dd8f02f4c164",
"path": "<Gamepad>/rightStick/down",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "bcc2da51-26a2-4ea8-ad2e-0f80ead4cb49",
"path": "<Gamepad>/rightStick/left",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "56b6a7fe-c046-4d8e-8680-fe05e8d1da9c",
"path": "<Gamepad>/rightStick/right",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "590b116c-1944-4775-b257-38030d2984a1",
"path": "<Mouse>/position",
"interactions": "",
"processors": "",
"groups": "Mouse only;Keyboard and Mouse",
"action": "Pointer Location",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b84e871e-22d2-440f-b701-a45dcc4189b9",
"path": "<Gamepad>/leftStick",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Pointer Location",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "1e76e0b9-0f8f-4874-851b-6f9a99088bb0",
"path": "<Keyboard>/rightShift",
"interactions": "",
"processors": "",
"groups": "Keyboard Only;Keyboard and Mouse",
"action": "Orbit Shift",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d60f0ca8-4a2c-4484-ab36-a3ddff6cd470",
"path": "<Keyboard>/leftShift",
"interactions": "",
"processors": "",
"groups": "Keyboard Only;Keyboard and Mouse",
"action": "Orbit Shift",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b0796cb6-0994-44a5-b2dc-ceaefda4012e",
"path": "<Mouse>/middleButton",
"interactions": "",
"processors": "",
"groups": "Mouse only;Keyboard and Mouse",
"action": "Orbit Shift",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "2d545d78-664a-43b9-a18d-ee56134e94b4",
"path": "<Gamepad>/rightShoulder",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Orbit Shift",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "bae1e739-d365-4957-b089-cc49e9106525",
"path": "<Mouse>/delta",
"interactions": "",
"processors": "",
"groups": "Mouse only;Keyboard and Mouse",
"action": "Pointer Delta",
"isComposite": false,
"isPartOfComposite": false
}
]
}
],
"controlSchemes": [
{
"name": "Keyboard Only",
"bindingGroup": "Keyboard Only",
"devices": [
{
"devicePath": "<Keyboard>",
"isOptional": false,
"isOR": false
}
]
},
{
"name": "Mouse only",
"bindingGroup": "Mouse only",
"devices": [
{
"devicePath": "<Mouse>",
"isOptional": false,
"isOR": false
}
]
},
{
"name": "Keyboard and Mouse",
"bindingGroup": "Keyboard and Mouse",
"devices": [
{
"devicePath": "<Keyboard>",
"isOptional": false,
"isOR": false
},
{
"devicePath": "<Mouse>",
"isOptional": false,
"isOR": false
}
]
},
{
"name": "Gamepad",
"bindingGroup": "Gamepad",
"devices": [
{
"devicePath": "<Gamepad>",
"isOptional": false,
"isOR": false
}
]
}
]
}
14 changes: 14 additions & 0 deletions Assets/Base Controls.inputactions.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions Assets/InputSystem.inputsettings.asset
@@ -0,0 +1,29 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3}
m_Name: InputSystem.inputsettings
m_EditorClassIdentifier:
m_SupportedDevices:
- Keyboard
- Gamepad
- Pointer
m_UpdateMode: 1
m_CompensateForScreenOrientation: 1
m_FilterNoiseOnCurrent: 0
m_DefaultDeadzoneMin: 0.125
m_DefaultDeadzoneMax: 0.925
m_DefaultButtonPressPoint: 0.5
m_DefaultTapTime: 0.2
m_DefaultSlowTapTime: 0.5
m_DefaultHoldTime: 0.4
m_TapRadius: 5
m_MultiTapDelayTime: 0.75

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions Assets/PanZoom/Editor.meta

This file was deleted.

0 comments on commit b738044

Please sign in to comment.