mirror of
https://github.com/overte-org/overte.git
synced 2025-04-10 08:56:57 +02:00
Android - Touch to rotate inverted X and Y axis and less sensitive.
This commit is contained in:
parent
3d933e1810
commit
f0e68ecffa
3 changed files with 4 additions and 4 deletions
|
@ -5,8 +5,8 @@
|
|||
|
||||
{ "from": "TouchscreenVirtualPad.LX", "when": "!Application.CameraIndependent", "filters": { "type": "deadZone", "min": 0.05 }, "to": "Actions.TranslateX" },
|
||||
|
||||
{ "from": "TouchscreenVirtualPad.RX", "when": "!Application.CameraIndependent", "filters": { "type": "deadZone", "min": 0.05 }, "to": "Actions.Yaw" },
|
||||
{ "from": "TouchscreenVirtualPad.RX", "when": "!Application.CameraIndependent", "filters": [ {"type": "deadZone", "min": 0.05} , "invert" ], "to": "Actions.Yaw" },
|
||||
|
||||
{ "from": "TouchscreenVirtualPad.RY", "when": "!Application.CameraIndependent", "to": "Actions.Pitch" }
|
||||
{ "from": "TouchscreenVirtualPad.RY", "when": "!Application.CameraIndependent", "filters": [ "invert" ], "to": "Actions.Pitch" }
|
||||
]
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ void TouchscreenVirtualPadDevice::pluginUpdate(float deltaTime, const controller
|
|||
|
||||
// NOW BETWEEN -1 1
|
||||
rightDistanceScaleX /= STICK_RADIUS_INCHES;
|
||||
rightDistanceScaleY /= STICK_RADIUS_INCHES;
|
||||
rightDistanceScaleY /= STICK_RADIUS_INCHES*2; // pitch is slower
|
||||
|
||||
_inputDevice->_axisStateMap[controller::RX] = rightDistanceScaleX;
|
||||
_inputDevice->_axisStateMap[controller::RY] = rightDistanceScaleY;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
class QTouchEvent;
|
||||
class QGestureEvent;
|
||||
|
||||
const float STICK_RADIUS_INCHES = .3f;
|
||||
const float STICK_RADIUS_INCHES = 1.0f;
|
||||
|
||||
class TouchscreenVirtualPadDevice : public InputPlugin {
|
||||
Q_OBJECT
|
||||
|
|
Loading…
Reference in a new issue