History

modified sword.js to work with vive controllers

SamGondelman committed 11 years ago

Commit 4d3b08b1 parent 69bfd7d3 files · +316 −171Browse files

Showing the changes to interface/src/scripting/ControllerScriptingInterface.cpp (1 of 3 files). Show all

Unified · Split

interface/src/scripting/ControllerScriptingInterface.cpp+4−0
@@ -468,6 +468,10 @@ int ControllerScriptingInterface::findDevice(QString name) { · 467 unmodified lines
468468 return DependencyManager::get<UserInputMapper>()->findDevice(name);
469469 }
470470
471+float ControllerScriptingInterface::getActionValue(int action) {
472+ return DependencyManager::get<UserInputMapper>()->getActionState(UserInputMapper::Action(action));
473+}
474+
471475 InputController::InputController(int deviceTrackerId, int subTrackerId, QObject* parent) :
472476 AbstractInputController(),
473477 _deviceTrackerId(deviceTrackerId),