History

more work in progress vive room tracking

Found and disabled torso twist use an old copy of the hmd pose before physics, and the most up to date one after physics.

Anthony J. Thibault committed 11 years ago

Commit 5293eff1 parent 834b75f8 files · +144 −93Browse files

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

Unified · Split

interface/src/Application.cpp+6−2
@@ -2670,6 +2670,10 @@ void Application::update(float deltaTime) { · 2669 unmodified lines
26702670 _physicsEngine.stepSimulation();
26712671 _entities.getTree()->unlock();
26722672
2673+ // AJT: delay the head pose until after the physics step.
2674+ _headPosition = glm::vec3(getActiveDisplayPlugin()->getHeadPose()[3]);
2675+ _headOrientation = glm::quat_cast(getActiveDisplayPlugin()->getHeadPose());
2676+
26732677 if (_physicsEngine.hasOutgoingChanges()) {
26742678 _entities.getTree()->lockForWrite();
26752679 _entitySimulation.lock();
@@ -4865,11 +4869,11 @@ void Application::shutdownPlugins() { · 2189 unmodified lines
48654869 }
48664870
48674871 glm::vec3 Application::getHeadPosition() const {
4868− return glm::vec3(getActiveDisplayPlugin()->getHeadPose()[3]);
4872+ return _headPosition;
48694873 }
48704874
48714875 glm::quat Application::getHeadOrientation() const {
4872− return glm::quat_cast(getActiveDisplayPlugin()->getHeadPose());
4876+ return _headOrientation;
48734877 }
48744878
48754879 glm::uvec2 Application::getCanvasSize() const {