mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-12 06:30:42 -06:00
Make buttons on SpaceMouse to switch between local and global roll
This commit is contained in:
@@ -194,7 +194,7 @@ void JoystickCameraStates::setAxisMapping(int axis, AxisType mapping,
|
||||
global::joystickInputStates->at(axis).isStatic = true;
|
||||
}
|
||||
|
||||
_prevAxisValues[axis] = 0.f;
|
||||
_prevAxisValues[axis] = global::joystickInputStates->axis(axis);
|
||||
}
|
||||
|
||||
JoystickCameraStates::AxisInformation JoystickCameraStates::axisMapping(int axis) const {
|
||||
|
||||
@@ -227,10 +227,12 @@ int joystickAxis(lua_State* L) {
|
||||
lua_settop(L, 0);
|
||||
const bool invert = info.invert;
|
||||
const bool normalize = info.normalize;
|
||||
ghoul::lua::push(L, ghoul::to_string(info.type), invert, normalize);
|
||||
const bool isStatic = info.isStatic;
|
||||
const float sensitivity = info.sensitivity;
|
||||
ghoul::lua::push(L, ghoul::to_string(info.type), invert, normalize, isStatic, sensitivity);
|
||||
|
||||
ghoul_assert(lua_gettop(L) == 3, "Incorrect number of items left on stack");
|
||||
return 3;
|
||||
ghoul_assert(lua_gettop(L) == 5, "Incorrect number of items left on stack");
|
||||
return 5;
|
||||
}
|
||||
|
||||
int setJoystickAxisDeadzone(lua_State* L) {
|
||||
|
||||
Reference in New Issue
Block a user