diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-29 15:20:32 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-29 15:20:32 +0200 |
commit | f03301ca1addda27b0c28c65749e21631da2ae97 (patch) | |
tree | aac1eccdbb0c8e0b77a2662d58d7501b2e97e9cf | |
parent | beb798d01ab941a9abd428f3ab2ce4dd54afa53c (diff) | |
parent | d83aaeea17fcf7a2bc4d7f4346280149ba222c8a (diff) | |
download | redot-engine-f03301ca1addda27b0c28c65749e21631da2ae97.tar.gz |
Merge pull request #91305 from BastiaanOlij/fix_mobile_vr_gyro
MobileVR: Orientation is progressive and needs to be initialized
-rw-r--r-- | modules/mobile_vr/mobile_vr_interface.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp index 94a3f0777e..bba56f6468 100644 --- a/modules/mobile_vr/mobile_vr_interface.cpp +++ b/modules/mobile_vr/mobile_vr_interface.cpp @@ -126,7 +126,7 @@ void MobileVRInterface::set_position_from_sensors() { // 9dof is a misleading marketing term coming from 3 accelerometer axis + 3 gyro axis + 3 magnetometer axis = 9 axis // but in reality this only offers 3 dof (yaw, pitch, roll) orientation - Basis orientation; + Basis orientation = head_transform.basis; uint64_t ticks = OS::get_singleton()->get_ticks_usec(); uint64_t ticks_elapsed = ticks - last_ticks; |