Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/openvr/ivrinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ SteamIVRInput::SteamIVRInput()
m_smoothTurnLeft( action_keys::smoothTurnLeft ),
m_smoothTurnRight( action_keys::smoothTurnRight ),
m_autoTurnToggle( action_keys::autoTurnToggle ),
m_addAutoAlignPointLeft( action_keys::addAutoAlignPointLeft ),
m_addAutoAlignPointRight( action_keys::addAutoAlignPointRight ),
m_xAxisLockToggle( action_keys::xAxisLockToggle ),
m_yAxisLockToggle( action_keys::yAxisLockToggle ),
m_zAxisLockToggle( action_keys::zAxisLockToggle ),
Expand Down Expand Up @@ -300,6 +302,15 @@ bool SteamIVRInput::autoTurnToggle()
{
return isDigitalActionActivatedOnce( m_autoTurnToggle );
}
bool SteamIVRInput::addAutoAlignPointLeft()
{
return isDigitalActionActivatedOnce( m_addAutoAlignPointLeft );
}

bool SteamIVRInput::addAutoAlignPointRight()
{
return isDigitalActionActivatedOnce( m_addAutoAlignPointRight );
}

bool SteamIVRInput::xAxisLockToggle()
{
Expand Down
8 changes: 8 additions & 0 deletions src/openvr/ivrinput.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ namespace action_keys
constexpr auto smoothTurnLeft = "/actions/motion/in/SmoothTurnLeft";
constexpr auto smoothTurnRight = "/actions/motion/in/SmoothTurnRight";
constexpr auto autoTurnToggle = "/actions/motion/in/AutoTurnToggle";
constexpr auto addAutoAlignPointLeft
= "/actions/motion/in/AddAutoAlignPointLeft";
constexpr auto addAutoAlignPointRight
= "/actions/motion/in/AddAutoAlignPointRight";

constexpr auto xAxisLockToggle = "/actions/misc/in/XAxisLockToggle";
constexpr auto yAxisLockToggle = "/actions/misc/in/YAxisLockToggle";
Expand Down Expand Up @@ -151,6 +155,8 @@ class SteamIVRInput
bool smoothTurnLeft();
bool smoothTurnRight();
bool autoTurnToggle();
bool addAutoAlignPointLeft();
bool addAutoAlignPointRight();
bool xAxisLockToggle();
bool yAxisLockToggle();
bool zAxisLockToggle();
Expand Down Expand Up @@ -233,6 +239,8 @@ class SteamIVRInput
DigitalAction m_smoothTurnLeft;
DigitalAction m_smoothTurnRight;
DigitalAction m_autoTurnToggle;
DigitalAction m_addAutoAlignPointLeft;
DigitalAction m_addAutoAlignPointRight;
DigitalAction m_xAxisLockToggle;
DigitalAction m_yAxisLockToggle;
DigitalAction m_zAxisLockToggle;
Expand Down
8 changes: 8 additions & 0 deletions src/overlaycontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,14 @@ void OverlayController::processRotationBindings()
m_rotationTabController.setAutoTurnEnabled(
!( m_rotationTabController.autoTurnEnabled() ) );
}
if ( m_actions.addAutoAlignPointLeft() )
{
m_rotationTabController.addAutoAlignPoint( false );
}
if ( m_actions.addAutoAlignPointRight() )
{
m_rotationTabController.addAutoAlignPoint( true );
}
}
/*!
Checks if an action has been activated and dispatches the related action if
Expand Down
15 changes: 13 additions & 2 deletions src/package_files/action_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,16 @@
"requirement": "optional",
"type": "boolean"
},

{
"name": "/actions/motion/in/AddAutoAlignPointLeft",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/motion/in/AddAutoAlignPointRight",
"requirement": "optional",
"type": "boolean"
},
{
"name": "/actions/misc/in/XAxisLockToggle",
"requirement": "optional",
Expand Down Expand Up @@ -288,6 +297,8 @@
"/actions/motion/in/SmoothTurnLeft" : "Smooth-Turn Left",
"/actions/motion/in/SmoothTurnRight" : "Smooth-Turn Right",
"/actions/motion/in/AutoTurnToggle" : "Auto-Turn Toggle",
"/actions/motion/in/AddAutoAlignPointLeft" : "Add Auto Align Point (Left Hand)",
"/actions/motion/in/AddAutoAlignPointRight" : "Add Auto Align Point (Right Hand)",

"/actions/misc/in/XAxisLockToggle" : "X-Axis Lock Toggle",
"/actions/misc/in/YAxisLockToggle" : "Y-Axis Lock Toggle",
Expand All @@ -303,4 +314,4 @@
"/actions/system/in/KeyPressSystem": "Key Press System"
}
]
}
}
108 changes: 108 additions & 0 deletions src/res/img/rotation/autoalign.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/res/img/rotation/autoalign1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/res/img/rotation/autoalign2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/res/img/rotation/autoalign3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/res/img/rotation/autoalign4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading