|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Button Layout on Dual Shock 4
Hello Everyone,
For the longest time, we have been using the Logitech dual shock controller as our main driving controller.Recently we moved to a PlayStation DualShock 4 controller for ergonomic reasons. So far it's been working great. Via the attached micro USB cable connection (cause sadly we can't use blutooth) control is normal, as the mapping pretty much stayed the same. One thing that we've never used though (and I would like to start using) are the D-pad buttons on the controller. Now, in the driver station they don't recognize as buttons, but rather the POV hat I believe. That being said, I'm not sure that I can reference them they same way I do buttons in code. gamepad.GetRawButton(some number here) That's how I would normally reference all the other buttons, but how do I reference the D-pad buttons in C++? I would appreciate any help possible! -Cinnamon Toast |
|
#2
|
|||
|
|||
|
Re: Button Layout on Dual Shock 4
Use the GetPOV() method of Joystck to get the current DPad reading. We've used something similar to this in the past::
Code:
switch (m_driveStick.GetPOV())
{
case 0:
// Do Something - the 'up' button
break;
case 90:
// Do Something - the 'right' button
break;
case 180:
// Do Something - down
break;
case 270:
// Do Something - left
break;
default:
break;
}
|
|
#3
|
||||
|
||||
|
Re: Button Layout on Dual Shock 4
Just to be clear it looks as if the d-pad buttons are referenced via angles going clockwise? And if two are referenced such as to give an angle in between 90 degree steps, just account for that with a split angle?
|
|
#4
|
|||
|
|||
|
Re: Button Layout on Dual Shock 4
What are you guys using as far as gaming controllers for your tablets? I have a PS3 and Xbox One controller at home. Just wondering if either can be easily used to play on my dragon touch m8 tablet.
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|