Skip to content

Commit 5d3b6a1

Browse files
necessary actions added for mobile target, point(position), and zoom&pinch
1 parent d8b89bc commit 5d3b6a1

File tree

3 files changed

+88
-11
lines changed

3 files changed

+88
-11
lines changed

Assets/InputSystem/PlayerActions.inputactions

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,15 @@
139139
"processors": "",
140140
"interactions": "",
141141
"initialStateCheck": true
142+
},
143+
{
144+
"name": "ScrollWheel",
145+
"type": "Value",
146+
"id": "a333c836-68b4-44ef-8f65-4c48bb3870c3",
147+
"expectedControlType": "Vector2",
148+
"processors": "",
149+
"interactions": "",
150+
"initialStateCheck": true
142151
}
143152
],
144153
"bindings": [
@@ -309,11 +318,11 @@
309318
},
310319
{
311320
"name": "",
312-
"id": "8817849f-00f0-4640-a383-abfd3a812ade",
313-
"path": "<Touchscreen>/primaryTouch/tap",
321+
"id": "dfdea74a-f685-40f7-856e-736492574188",
322+
"path": "<Touchscreen>/touch*/press",
314323
"interactions": "",
315324
"processors": "",
316-
"groups": ";Touch",
325+
"groups": "Touch",
317326
"action": "Target",
318327
"isComposite": false,
319328
"isPartOfComposite": false
@@ -339,6 +348,72 @@
339348
"action": "Point",
340349
"isComposite": false,
341350
"isPartOfComposite": false
351+
},
352+
{
353+
"name": "",
354+
"id": "897044fe-c81a-4245-ba4a-5bc7c717bedb",
355+
"path": "<Touchscreen>/touch*/position",
356+
"interactions": "",
357+
"processors": "",
358+
"groups": "Touch",
359+
"action": "Point",
360+
"isComposite": false,
361+
"isPartOfComposite": false
362+
},
363+
{
364+
"name": "",
365+
"id": "0e6a3466-3efb-4405-8ff2-068eeff4b435",
366+
"path": "<Mouse>/scroll",
367+
"interactions": "",
368+
"processors": "",
369+
"groups": ";Keyboard&Mouse",
370+
"action": "ScrollWheel",
371+
"isComposite": false,
372+
"isPartOfComposite": false
373+
},
374+
{
375+
"name": "Two Modifiers",
376+
"id": "a7d13156-4095-4d23-8e27-53b486aa0930",
377+
"path": "TwoModifiers",
378+
"interactions": "",
379+
"processors": "",
380+
"groups": "",
381+
"action": "ScrollWheel",
382+
"isComposite": true,
383+
"isPartOfComposite": false
384+
},
385+
{
386+
"name": "modifier1",
387+
"id": "3c8e94d7-5fda-4b27-9a33-a912cb2fd103",
388+
"path": "<Touchscreen>/touch0/press",
389+
"interactions": "",
390+
"processors": "",
391+
"groups": ";Touch",
392+
"action": "ScrollWheel",
393+
"isComposite": false,
394+
"isPartOfComposite": true
395+
},
396+
{
397+
"name": "modifier2",
398+
"id": "3b706b16-7840-4f02-9f8f-7453a22b1f47",
399+
"path": "<Touchscreen>/touch1/press",
400+
"interactions": "",
401+
"processors": "",
402+
"groups": "",
403+
"action": "ScrollWheel",
404+
"isComposite": false,
405+
"isPartOfComposite": true
406+
},
407+
{
408+
"name": "binding",
409+
"id": "02294441-af70-4095-af64-d2ec6a4590dd",
410+
"path": "<Touchscreen>/delta",
411+
"interactions": "",
412+
"processors": "",
413+
"groups": ";Touch",
414+
"action": "ScrollWheel",
415+
"isComposite": false,
416+
"isPartOfComposite": true
342417
}
343418
]
344419
},

Assets/Prefabs/GameCam/CMCameraPrefab.prefab

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ MonoBehaviour:
280280
Owner: {fileID: 2134312450369994339}
281281
Enabled: 1
282282
Input:
283-
LegacyInput:
284-
LegacyGain: 300
283+
InputAction: {fileID: 0}
284+
Gain: 1
285285
CancelDeltaTime: 0
286286
InputValue: 0
287287
Driver:
@@ -291,8 +291,8 @@ MonoBehaviour:
291291
Owner: {fileID: 2134312450369994339}
292292
Enabled: 1
293293
Input:
294-
LegacyInput: Mouse ScrollWheel
295-
LegacyGain: 5
294+
InputAction: {fileID: -5536139033653354306, guid: add476edce0d24d26bcdaf1681449ecf, type: 3}
295+
Gain: 1
296296
CancelDeltaTime: 0
297297
InputValue: 0
298298
Driver:
@@ -302,13 +302,15 @@ MonoBehaviour:
302302
Owner: {fileID: 2134312450369994339}
303303
Enabled: 1
304304
Input:
305-
LegacyInput: Mouse ScrollWheel
306-
LegacyGain: 200
305+
InputAction: {fileID: 0}
306+
Gain: 1
307307
CancelDeltaTime: 0
308308
InputValue: 0
309309
Driver:
310310
AccelTime: 0
311311
DecelTime: 0
312+
PlayerIndex: -1
313+
AutoEnableInputs: 1
312314
--- !u!1 &2167489802469618434
313315
GameObject:
314316
m_ObjectHideFlags: 0

Assets/Scripts/Gameplay/UserInput/ClientInputSender.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ public override void OnNetworkDespawn()
203203
m_TargetServerCharacter.NetLifeState.LifeState.OnValueChanged -= OnTargetLifeStateChanged;
204204
}
205205

206-
m_Action2.action.started -= OnAction1Started;
207-
m_Action2.action.canceled -= OnAction1Canceled;
206+
m_Action1.action.started -= OnAction1Started;
207+
m_Action1.action.canceled -= OnAction1Canceled;
208208
m_Action2.action.started -= OnAction2Started;
209209
m_Action2.action.canceled -= OnAction2Canceled;
210210
m_Action3.action.started -= OnAction3Started;

0 commit comments

Comments
 (0)