Fix UnityXR position when humanoid is not on 0,0,0

This commit is contained in:
Pascal Serrarens 2022-03-23 09:09:26 +01:00
parent 8a3a2be643
commit a7bdaa081f

View File

@ -61,9 +61,9 @@ namespace Passer.Humanoid {
if (trackerComponent == null) { if (trackerComponent == null) {
Transform realWorld = this.humanoid.realWorld; Transform realWorld = this.humanoid.realWorld;
Vector3 position = realWorld.TransformPoint(localPosition); //Vector3 position = realWorld.TransformPoint(localPosition);
Quaternion rotation = realWorld.rotation * localRotation; //Quaternion rotation = realWorld.rotation * localRotation;
trackerComponent = getTracker(realWorld, position, rotation); trackerComponent = getTracker(realWorld, localPosition, localRotation);
} }
if (trackerComponent == null) if (trackerComponent == null)
return; return;