Removed unneeded HeadSensor

This commit is contained in:
Pascal Serrarens 2022-06-29 14:19:07 +02:00
parent 54cb265be1
commit 450ec9012f
2 changed files with 13 additions and 10 deletions

View File

@ -1,4 +1,5 @@
namespace Passer.Humanoid.Tracking { /*
namespace Passer.Humanoid.Tracking {
/// <summary> /// <summary>
/// Humanoid head tracking sensor /// Humanoid head tracking sensor
/// </summary> /// </summary>
@ -70,3 +71,5 @@
//} //}
} }
} }
*/

View File

@ -88,15 +88,15 @@ namespace Passer.Humanoid {
//UpdateHeadTargetTransform(sensor); //UpdateHeadTargetTransform(sensor);
} }
protected virtual void UpdateHeadTargetTransform(Humanoid.Tracking.HeadSensor headTracker) { //protected virtual void UpdateHeadTargetTransform(Humanoid.Tracking.HeadSensor headTracker) {
if (headTarget.head.target.transform != null) { // if (headTarget.head.target.transform != null) {
if (headTracker.head.confidence.rotation > 0) // if (headTracker.head.confidence.rotation > 0)
headTarget.head.target.transform.rotation = HumanoidTarget.ToQuaternion(headTracker.head.rotation) * sensor2TargetRotation; // headTarget.head.target.transform.rotation = HumanoidTarget.ToQuaternion(headTracker.head.rotation) * sensor2TargetRotation;
if (headTracker.head.confidence.position > 0) // 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.transform.position = HumanoidTarget.ToVector3(headTracker.head.position) + headTarget.head.target.transform.rotation * sensor2TargetPosition;
headTarget.head.target.confidence = headTracker.head.confidence; // headTarget.head.target.confidence = headTracker.head.confidence;
} // }
} //}
virtual protected void UpdateNeckTargetFromHead() { virtual protected void UpdateNeckTargetFromHead() {
Vector3 headPosition = headTarget.head.target.transform.position; Vector3 headPosition = headTarget.head.target.transform.position;