History

Merge branch 'sam/vive-hand-controllers' of github.com:hyperlogic/hifi into sam/vive-hand-controllers

Anthony J. Thibault committed 11 years ago

Commit ce80bff2 parents 56e7af0 7a3f5393 files · +43 −63Browse files

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

Unified · Split

interface/src/Application.cpp+6−4
@@ -2589,6 +2589,9 @@ void Application::update(float deltaTime) { · 2588 unmodified lines
25892589 updateLOD();
25902590 updateMouseRay(); // check what's under the mouse and update the mouse voxel
25912591
2592+ // update the avatar with a fresh HMD pose
2593+ _myAvatar->updateFromHMDSensorMatrix(getHMDSensorPose());
2594+
25922595 {
25932596 PerformanceTimer perfTimer("devices");
25942597 DeviceTracker::updateAll();
@@ -2693,7 +2696,6 @@ void Application::update(float deltaTime) { · 98 unmodified lines
26932696 _entitySimulation.applyActionChanges();
26942697 _entitySimulation.unlock();
26952698
2696−
26972699 AvatarManager* avatarManager = DependencyManager::get<AvatarManager>().data();
26982700 _physicsEngine.deleteObjects(avatarManager->getObjectsToDelete());
26992701 _physicsEngine.addObjects(avatarManager->getObjectsToAdd());
@@ -2703,9 +2705,6 @@ void Application::update(float deltaTime) { · 3 unmodified lines
27032705 _physicsEngine.stepSimulation();
27042706 _entities.getTree()->unlock();
27052707
2706− // update the avatar with the current HMD pose
2707− _myAvatar->setHMDSensorMatrix(getHMDSensorPose());
2708−
27092708 if (_physicsEngine.hasOutgoingChanges()) {
27102709 _entities.getTree()->lockForWrite();
27112710 _entitySimulation.lock();
@@ -2803,6 +2802,9 @@ void Application::update(float deltaTime) { · 91 unmodified lines
28032802 QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), "sendDownstreamAudioStatsPacket", Qt::QueuedConnection);
28042803 }
28052804 }
2805+
2806+ // update sensorToWorldMatrix for rendering camera.
2807+ _myAvatar->updateSensorToWorldMatrix();
28062808 }
28072809
28082810 void Application::setPalmData(Hand* hand, UserInputMapper::PoseValue pose, int index) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t