Commit 374cc818 authored by Jérémy Lacoche's avatar Jérémy Lacoche
Browse files

Important fix : wrong way to manage reloc information. In case of multiple...

Important fix : wrong way to manage reloc information. In case of multiple possible trackables only the first one was taken into account
parent 7aeed4c2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -157,7 +157,6 @@ public class WorldAnalysisARFoundation : MonoBehaviour, WorldAnalysisInterface
            foreach (KeyValuePair<Guid, SubscriptionInfo> subPose in m_subscriptionsPoses)
            {
                RelocalizationInformation information = m_relocalizationInformations[subPose.Value.uuidTarget];
                RelocObjects firstRelocInfo = information.RelocObjects.First();
                Dictionary<Guid, RelocObjects> temp = information.RelocObjects.ToDictionary(relocObject => relocObject.Trackable.UUID, relocObject => relocObject);

                /// Trackable selection
@@ -235,7 +234,8 @@ public class WorldAnalysisARFoundation : MonoBehaviour, WorldAnalysisInterface
                        continue;
                    }
                    
                    Matrix4x4 tr = WorldStorageUnityHelper.ConvertETSIARFTransform3DToUnity(firstRelocInfo.Transform3D);  // Changed to WS / SylR
                    Matrix4x4 tr = WorldStorageUnityHelper.ConvertETSIARFTransform3DToUnity(temp[bestTrackableCandidateID].Transform3D);  // Changed to WS / SylR
  
                    UnityEngine.Vector3 tr_trans = WorldAnalysisUnityHelper.ExtractTranslationFromMatrix(tr);
                    UnityEngine.Quaternion tr_rot = WorldAnalysisUnityHelper.ExtractRotationFromMatrix(tr);