From 450ec9012fc8381b28aa448d0e448b37d00b5e3a Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Wed, 29 Jun 2022 14:19:07 +0200 Subject: [PATCH] Removed unneeded HeadSensor --- .../Libraries/Core/Sensors/HeadSensor.cs | 5 ++++- .../Scripts/Extensions/HeadSensor.cs | 18 +++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Runtime/HumanoidControl/Libraries/Core/Sensors/HeadSensor.cs b/Runtime/HumanoidControl/Libraries/Core/Sensors/HeadSensor.cs index 7fae5d6..6f93694 100644 --- a/Runtime/HumanoidControl/Libraries/Core/Sensors/HeadSensor.cs +++ b/Runtime/HumanoidControl/Libraries/Core/Sensors/HeadSensor.cs @@ -1,4 +1,5 @@ -namespace Passer.Humanoid.Tracking { +/* +namespace Passer.Humanoid.Tracking { /// /// Humanoid head tracking sensor /// @@ -70,3 +71,5 @@ //} } } + +*/ \ No newline at end of file diff --git a/Runtime/HumanoidControl/Scripts/Extensions/HeadSensor.cs b/Runtime/HumanoidControl/Scripts/Extensions/HeadSensor.cs index 568ab40..9e20a98 100644 --- a/Runtime/HumanoidControl/Scripts/Extensions/HeadSensor.cs +++ b/Runtime/HumanoidControl/Scripts/Extensions/HeadSensor.cs @@ -88,15 +88,15 @@ namespace Passer.Humanoid { //UpdateHeadTargetTransform(sensor); } - protected virtual void UpdateHeadTargetTransform(Humanoid.Tracking.HeadSensor headTracker) { - if (headTarget.head.target.transform != null) { - if (headTracker.head.confidence.rotation > 0) - headTarget.head.target.transform.rotation = HumanoidTarget.ToQuaternion(headTracker.head.rotation) * sensor2TargetRotation; - if (headTracker.head.confidence.position > 0) - headTarget.head.target.transform.position = HumanoidTarget.ToVector3(headTracker.head.position) + headTarget.head.target.transform.rotation * sensor2TargetPosition; - headTarget.head.target.confidence = headTracker.head.confidence; - } - } + //protected virtual void UpdateHeadTargetTransform(Humanoid.Tracking.HeadSensor headTracker) { + // if (headTarget.head.target.transform != null) { + // if (headTracker.head.confidence.rotation > 0) + // headTarget.head.target.transform.rotation = HumanoidTarget.ToQuaternion(headTracker.head.rotation) * sensor2TargetRotation; + // if (headTracker.head.confidence.position > 0) + // headTarget.head.target.transform.position = HumanoidTarget.ToVector3(headTracker.head.position) + headTarget.head.target.transform.rotation * sensor2TargetPosition; + // headTarget.head.target.confidence = headTracker.head.confidence; + // } + //} virtual protected void UpdateNeckTargetFromHead() { Vector3 headPosition = headTarget.head.target.transform.position;