@@ -40,10 +40,9 @@ void TutorialDriver::HMDDevice::update(std::vector<vr::VREvent_t> events)
40
40
pose.qRotation .y = pose_rot.y ;
41
41
pose.qRotation .z = pose_rot.z ;
42
42
43
+ // Update position based on rotation
43
44
linalg::vec<float , 3 > forward_vec{-1 .0f * (GetAsyncKeyState (0x44 ) == 0 ) + 1 .0f * (GetAsyncKeyState (0x41 ) == 0 ), 0 , 0 };
44
-
45
45
linalg::vec<float , 3 > right_vec{0 , 0 , 1 .0f * (GetAsyncKeyState (0x57 ) == 0 ) - 1 .0f * (GetAsyncKeyState (0x53 ) == 0 ) };
46
-
47
46
linalg::vec<float , 3 > final_dir = forward_vec + right_vec;
48
47
if (linalg::length (final_dir) > 0.01 ) {
49
48
final_dir = linalg::normalize (final_dir) * (float )deltaTimeSeconds;
@@ -86,7 +85,18 @@ vr::EVRInitError TutorialDriver::HMDDevice::Activate(uint32_t unObjectId)
86
85
vr::VRProperties ()->SetStringProperty (props, vr::Prop_ModelNumber_String, " Tutorial HMD Device" );
87
86
88
87
// Set up a rendermodel name
89
- vr::VRProperties ()->SetStringProperty (props, vr::Prop_RenderModelName_String, " tutorial_hmd_model" );
88
+ vr::VRProperties ()->SetStringProperty (props, vr::Prop_RenderModelName_String, " {tutorial_hmd}tutorial_hmd_model" );
89
+
90
+ // Set up icon paths
91
+ vr::VRProperties ()->SetStringProperty (props, vr::Prop_NamedIconPathDeviceReady_String, " {tutorial_hmd}/icons/hmd_ready.png" );
92
+
93
+ vr::VRProperties ()->SetStringProperty (props, vr::Prop_NamedIconPathDeviceOff_String, " {tutorial_hmd}/icons/hmd_not_ready.png" );
94
+ vr::VRProperties ()->SetStringProperty (props, vr::Prop_NamedIconPathDeviceSearching_String, " {tutorial_hmd}/icons/hmd_not_ready.png" );
95
+ vr::VRProperties ()->SetStringProperty (props, vr::Prop_NamedIconPathDeviceSearchingAlert_String, " {tutorial_hmd}/icons/hmd_not_ready.png" );
96
+ vr::VRProperties ()->SetStringProperty (props, vr::Prop_NamedIconPathDeviceReadyAlert_String, " {tutorial_hmd}/icons/hmd_not_ready.png" );
97
+ vr::VRProperties ()->SetStringProperty (props, vr::Prop_NamedIconPathDeviceNotReady_String, " {tutorial_hmd}/icons/hmd_not_ready.png" );
98
+ vr::VRProperties ()->SetStringProperty (props, vr::Prop_NamedIconPathDeviceStandby_String, " {tutorial_hmd}/icons/hmd_not_ready.png" );
99
+ vr::VRProperties ()->SetStringProperty (props, vr::Prop_NamedIconPathDeviceAlertLow_String, " {tutorial_hmd}/icons/hmd_not_ready.png" );
90
100
91
101
this ->m_lastFrameTime = std::chrono::system_clock::now ();
92
102
0 commit comments