Skip to content

Commit 7fe264b

Browse files
committed
added reset yaw functionality, replacing setroomrotationusinghead for now
1 parent c3ba6c6 commit 7fe264b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ endif()
3737
add_library(osvrUnityRenderingPlugin MODULE ${osvrUnityRenderingPlugin_SOURCES})
3838
#set_target_properties(osvrUnityRenderingPlugin PROPERTIES LINK_FLAGS "/DEF:${CMAKE_CURRENT_SOURCE_DIR}/OsvrRenderingPlugin.def")
3939
target_link_libraries(osvrUnityRenderingPlugin osvr::osvrClientKit)
40+
target_link_libraries(osvrUnityRenderingPlugin osvr::osvrResetYaw)
4041
target_link_libraries(osvrUnityRenderingPlugin osvrRenderManager::osvrRenderManager)
4142
target_include_directories(osvrUnityRenderingPlugin PRIVATE ${Boost_INCLUDE_DIRS})
4243
# target_link_libraries(osvrUnityRenderingPlugin ${Boost_LIBRARIES})

OsvrRenderingPlugin.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Sensics, Inc.
3535
#include <osvr/ClientKit/Interface.h>
3636
#include <osvr/Util/Finally.h>
3737
#include <osvr/Util/MatrixConventionsC.h>
38-
3938
// standard includes
4039
#if defined(ENABLE_LOGGING) && defined(ENABLE_LOGFILE)
4140
#include <fstream>
@@ -372,7 +371,7 @@ UpdateDistortionMesh(float distanceScale[2], float centerOfProjection[2],
372371
// Note that this method internally calls osvrClientUpdate() to get a head pose
373372
// so your callbacks may be called during its execution!
374373
/// @todo does this actually get called from anywhere or is it dead code?
375-
void SetRoomRotationUsingHead() { s_render->SetRoomRotationUsingHead(); }
374+
void SetRoomRotationUsingHead() { /*s_render->SetRoomRotationUsingHead();*/ }
376375

377376
// Clears/resets the internal "room to world" transformation back to an
378377
// identity transformation - that is, clears the effect of any other
@@ -896,7 +895,8 @@ void UNITY_INTERFACE_API OnRenderEvent(int eventID) {
896895
UpdateRenderInfo();
897896
break;
898897
case kOsvrEventID_SetRoomRotationUsingHead:
899-
SetRoomRotationUsingHead();
898+
osvrResetYaw();
899+
//SetRoomRotationUsingHead();
900900
break;
901901
case kOsvrEventID_ClearRoomToWorldTransform:
902902
ClearRoomToWorldTransform();

OsvrRenderingPlugin.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Sensics, Inc.
2828
#include <osvr/RenderKit/RenderKitGraphicsTransforms.h>
2929
#include <osvr/Util/ClientOpaqueTypesC.h>
3030
#include <osvr/Util/ReturnCodesC.h>
31-
31+
#include <osvr/ResetYaw/ResetYaw.h>
3232
typedef void(UNITY_INTERFACE_API *DebugFnPtr)(const char *);
3333

3434
extern "C" {

0 commit comments

Comments
 (0)