Hi. This might be a stupid question, but I figured I’d ask anyway.
In Unity, I am attempting to allow my player to rack a shotgun by swiping down on a PS4 controller’s touchpad by using the new input system. I would like to detect the swiping by reading the initial and final position of a touchpad press. But I can’t figure out how I can detect the position of a touchpad press. I can detect a touchpad press, just not where that press occurs.
Is there a way I can detect the initial and final position of a DualShock touchpad press using Unity’s new input system?
If you can leave a reply, I would be most grateful.
i imagine it would be just like working with a virtual joystick in an android game, theres a simple joystick tutorial here Mobile Joystick For Unity 2D EASY (youtube.com) that has a bare bones c# code that detects a “pointer down” “drag” and “pointer up” i imagine you have to calculate the direction of the swipe by comparing it against the first and last touch position. idk, i have never worked with ps4 before but i imagine the coding basis isnt really that different seeing as they are both touch sensitive.
Yeah, I imagine the programming process wouldn’t be different. But what I am having trouble with is accessing the actual touchpad position input action using the new input system.
Ive never recieved the source code for ps4 development so i wouldnt know, i cant imagine you could run that through an AI because its proprietary code , maybe try to contact someone at sony to send you a list of funtions you can access through C#
The PS4 touchpad position detection is only supported when building directly for playstation hardware
(so if you are developing for windows or mac then this is not officially supported)