Skip to content

Commit

Permalink
Object Data Quaternion Fix
Browse files Browse the repository at this point in the history
Former-commit-id: 575377b
  • Loading branch information
DhruvInsight committed Apr 15, 2024
1 parent b39ebca commit 862c338
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 499 deletions.
7 changes: 5 additions & 2 deletions Assets/InsightXR/Runtime/Utils/ObjectData.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

public class ObjectData
Expand All @@ -9,9 +10,9 @@ public class ObjectData
public ObjectData(Vector3 pos, Quaternion rot)
{
(posx, posy, posz) = (pos.x,pos.y,pos.z);
(rotx, roty, rotz, rotw) = (rot.z, rot.y, rot.z, rot.w);
(rotx, roty, rotz, rotw) = (rot.x, rot.y, rot.z, rot.w);

}

public Vector3 GetPosition()
{
return new Vector3(posx, posy, posz);
Expand All @@ -21,4 +22,6 @@ public Quaternion GetRotation()
{
return new Quaternion(rotx, roty, rotz, rotw);
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &91766113
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -703,7 +702,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!114 &116837528
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -743,7 +741,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!114 &116837530
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -962,7 +959,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!114 &116837539
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1236,7 +1232,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!114 &120191289
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1523,7 +1518,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &253681956
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1760,7 +1754,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!4 &600394703 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -1013002781756113316, guid: 23329ab74ba53db41a94a77a259ffe95,
Expand Down Expand Up @@ -1946,7 +1939,7 @@ PrefabInstance:
- target: {fileID: 5614644653849769592, guid: 988358f111e06bb4aaeb3647e9d87833,
type: 3}
propertyPath: UserID
value: NewUltimateXR
value: UNewREc
objectReference: {fileID: 0}
- target: {fileID: 5614644653849769592, guid: 988358f111e06bb4aaeb3647e9d87833,
type: 3}
Expand Down Expand Up @@ -2307,7 +2300,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1001 &864581176
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2423,7 +2415,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &926297923
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2549,7 +2540,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!114 &1031088896
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2719,7 +2709,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!114 &1097469951
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -2736,7 +2725,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!4 &1101349074 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -296389330459107948, guid: 23329ab74ba53db41a94a77a259ffe95,
Expand Down Expand Up @@ -3070,7 +3058,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &1818433141
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -3192,7 +3179,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &1997833699 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 7826324823070394496, guid: 988358f111e06bb4aaeb3647e9d87833,
Expand Down
39 changes: 11 additions & 28 deletions Assets/InsightXR/Samples/XRIT/XRIT_DemoScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -410,12 +410,12 @@ PrefabInstance:
- target: {fileID: 5614644653849769592, guid: 988358f111e06bb4aaeb3647e9d87833,
type: 3}
propertyPath: UserID
value: NewXRit
value: NewRec
objectReference: {fileID: 0}
- target: {fileID: 5614644653849769592, guid: 988358f111e06bb4aaeb3647e9d87833,
type: 3}
propertyPath: replay
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5614644653849769592, guid: 988358f111e06bb4aaeb3647e9d87833,
type: 3}
Expand Down Expand Up @@ -4816,22 +4816,22 @@ PrefabInstance:
- target: {fileID: 7387125324240799344, guid: efebdf03cb1ccd043827e933755e413e,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7387125324240799344, guid: efebdf03cb1ccd043827e933755e413e,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7387125324240799344, guid: efebdf03cb1ccd043827e933755e413e,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 122
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7387125324240799344, guid: efebdf03cb1ccd043827e933755e413e,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -30
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
Expand Down Expand Up @@ -5770,7 +5770,7 @@ PrefabInstance:
- target: {fileID: 6242851353689079636, guid: f9da24840c60a814295b88e6319d9f9c,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 91
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6242851353689079636, guid: f9da24840c60a814295b88e6319d9f9c,
type: 3}
Expand Down Expand Up @@ -9453,7 +9453,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1001 &651545058
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -12522,7 +12521,7 @@ PrefabInstance:
- target: {fileID: 8107108474233336363, guid: 49e2fbde9521b4341879174df5a51b64,
type: 3}
propertyPath: m_SizeDelta.x
value: 262.09998
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8107108474233336363, guid: 49e2fbde9521b4341879174df5a51b64,
type: 3}
Expand All @@ -12532,7 +12531,7 @@ PrefabInstance:
- target: {fileID: 8107108474233336363, guid: 49e2fbde9521b4341879174df5a51b64,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 147.04999
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8107108474233336363, guid: 49e2fbde9521b4341879174df5a51b64,
type: 3}
Expand Down Expand Up @@ -13020,7 +13019,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1001 &960103813
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -14135,7 +14133,7 @@ PrefabInstance:
- target: {fileID: 781630663273105846, guid: fcac0c3f142ea3742a0565751dec41de,
type: 3}
propertyPath: m_SizeDelta.x
value: 262.09998
value: 0
objectReference: {fileID: 0}
- target: {fileID: 781630663273105846, guid: fcac0c3f142ea3742a0565751dec41de,
type: 3}
Expand All @@ -14145,7 +14143,7 @@ PrefabInstance:
- target: {fileID: 781630663273105846, guid: fcac0c3f142ea3742a0565751dec41de,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 147.04999
value: 0
objectReference: {fileID: 0}
- target: {fileID: 781630663273105846, guid: fcac0c3f142ea3742a0565751dec41de,
type: 3}
Expand Down Expand Up @@ -15267,7 +15265,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &1140094416
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -15824,7 +15821,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1001 &1148264533
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -16542,7 +16538,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1001 &1166548519
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -16952,7 +16947,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &1207484725
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -17612,7 +17606,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1001 &1243242693
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -17781,7 +17774,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &1275747071
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -25141,7 +25133,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &1720051934
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -29866,7 +29857,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &1969712488 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4787228807419146464, guid: 11d9c2d4a31153d48871dba786324550,
Expand All @@ -29889,7 +29879,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1001 &1970042954
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -30307,7 +30296,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &2021173548
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -30693,7 +30681,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &2031060698
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -30951,7 +30938,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1001 &2036796630
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -31379,7 +31365,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1 &2070059959
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -32196,7 +32181,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!1001 &2110687715
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -32868,7 +32852,6 @@ MonoBehaviour:
type: 2}
DistributionChannel: {fileID: 11400000, guid: 20c68f32a92594ae783b61a5e09f9298,
type: 2}
hand: 0
--- !u!114 &2142055061
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
Loading

0 comments on commit 862c338

Please sign in to comment.