Skip to content

Commit

Permalink
Added gamepad support.
Browse files Browse the repository at this point in the history
Code readability has been improved.
Added gamepad support.
Added rollSpeed variable.
A known bug has been fixed.
Camera input class has been changed.
  • Loading branch information
alisahanyalcin committed Nov 13, 2021
1 parent b6570ce commit 86d331e
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 2,824 deletions.
2 changes: 1 addition & 1 deletion ATPC/Editor/WindowCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void CreatePlayer()
cc.skinWidth = 0.02f;
cc.minMoveDistance = 0f;
cc.center = new Vector3(0, 0.93f, 0);
cc.radius = 0.28f;
cc.radius = 0.2f;
cc.height = 1.8f;

var tpc = playerObject.AddComponent<ThirdPersonController>();
Expand Down
46 changes: 23 additions & 23 deletions ATPC/InputSystem/ATPC.inputactions
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{
"name": "Look",
"type": "Value",
"id": "2690c379-f54d-45be-a724-414123833eb4",
"id": "cc762bcd-5029-4285-b026-f51ecd2bb2dc",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
Expand Down Expand Up @@ -171,28 +171,6 @@
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "ed66cbff-2900-4a62-8896-696503cfcd31",
"path": "<Pointer>/delta",
"interactions": "",
"processors": "InvertVector2(invertX=false),ScaleVector2(x=15,y=15)",
"groups": "KeyboardMouse",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d1d171b6-19d8-47a6-ba3a-71b6a8e7b3c0",
"path": "<Gamepad>/rightStick",
"interactions": "",
"processors": "InvertVector2(invertX=false),StickDeadzone,ScaleVector2(x=300,y=300)",
"groups": "Gamepad",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "1bd55a0b-761e-4ae4-89ae-8ec127e08a29",
Expand Down Expand Up @@ -269,6 +247,28 @@
"action": "Roll",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "91dbcc60-354a-4eba-a673-cc4d723c5511",
"path": "<Pointer>/delta",
"interactions": "",
"processors": "",
"groups": "KeyboardMouse",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "9ef618c5-a718-4cf2-a27f-89fe6392a26f",
"path": "<Gamepad>/rightStick",
"interactions": "",
"processors": "StickDeadzone,ScaleVector2(x=30,y=30)",
"groups": "Gamepad",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion ATPC/Prefabs/Camera.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
PlayerIndex: -1
XYAxis: {fileID: -5630151704836100654, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
XYAxis: {fileID: -3882242117582131591, guid: f1672dd8c9abc954dac361e3df71f830, type: 3}
ZAxis: {fileID: 0}
--- !u!114 &5803387758314872704
MonoBehaviour:
Expand Down
Loading

0 comments on commit 86d331e

Please sign in to comment.