mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 16:43:33 +02:00
Correcting update order to fix mouse
This commit is contained in:
parent
184303d3c9
commit
a8e707ced2
2 changed files with 8 additions and 21 deletions
|
@ -2710,22 +2710,6 @@ void Application::update(float deltaTime) {
|
|||
auto myAvatar = getMyAvatar();
|
||||
auto userInputMapper = DependencyManager::get<UserInputMapper>();
|
||||
userInputMapper->setSensorToWorldMat(myAvatar->getSensorToWorldMatrix());
|
||||
// userInputMapper->update(deltaTime);
|
||||
|
||||
// This needs to go after userInputMapper->update() because of the keyboard
|
||||
bool jointsCaptured = false;
|
||||
auto inputPlugins = PluginManager::getInstance()->getInputPlugins();
|
||||
foreach(auto inputPlugin, inputPlugins) {
|
||||
QString name = inputPlugin->getName();
|
||||
QAction* action = Menu::getInstance()->getActionForOption(name);
|
||||
if (action && action->isChecked()) {
|
||||
inputPlugin->pluginUpdate(deltaTime, jointsCaptured);
|
||||
if (inputPlugin->isJointController()) {
|
||||
jointsCaptured = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dispatch input events
|
||||
_controllerScriptingInterface->update();
|
||||
|
||||
|
|
|
@ -173,15 +173,18 @@ void ControllerScriptingInterface::update() {
|
|||
float delta = now - last;
|
||||
last = now;
|
||||
|
||||
for(auto inputPlugin : PluginManager::getInstance()->getInputPlugins()) {
|
||||
DependencyManager::get<UserInputMapper>()->update(delta);
|
||||
|
||||
bool jointsCaptured = false;
|
||||
for (auto inputPlugin : PluginManager::getInstance()->getInputPlugins()) {
|
||||
if (inputPlugin->isActive()) {
|
||||
inputPlugin->pluginUpdate(delta, false);
|
||||
inputPlugin->pluginUpdate(delta, jointsCaptured);
|
||||
if (inputPlugin->isJointController()) {
|
||||
jointsCaptured = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto userInputMapper = DependencyManager::get<UserInputMapper>();
|
||||
userInputMapper->update(delta);
|
||||
|
||||
for (auto entry : _inputControllers) {
|
||||
entry.second->update();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue