protected virtual void UpdateTarget(HumanoidTarget.TargetTransform target, SensorComponent sensorComponent) { if (target.transform == null || sensorComponent.rotationConfidence + sensorComponent.positionConfidence <= 0) { return; } target.transform.rotation = GetTargetRotation(sensorComponent.transform); target.confidence.rotation = sensorComponent.rotationConfidence; target.transform.position = GetTargetPosition(sensorComponent.transform); target.confidence.position = sensorComponent.positionConfidence; }
protected override void UpdateTarget(HumanoidTarget.TargetTransform target, SensorComponent sensorComponent) { if (target.transform == null || sensorComponent.rotationConfidence + sensorComponent.positionConfidence <= 0) { return; } Quaternion sensorRotation = GetTargetRotation(sensorComponent.transform); Vector3 sensorForward = sensorRotation * Vector3.forward; target.transform.rotation = Quaternion.LookRotation(sensorForward, hipsTarget.humanoid.up); target.confidence.rotation = sensorComponent.rotationConfidence; target.transform.position = GetTargetPosition(sensorComponent.transform); target.confidence.position = sensorComponent.positionConfidence; }
protected override void UpdateTarget(HumanoidTarget.TargetTransform target, SensorComponent sensorComponent) { if (target.transform == null || sensorComponent.rotationConfidence + sensorComponent.positionConfidence <= 0) { return; } // Workaround for 90 degrees issue in SteamVR without Action Manifests target.transform.rotation = GetTargetRotation(sensorComponent.transform); target.confidence.rotation = sensorComponent.rotationConfidence; // Foot rotation is derived from lowerleg //target.transform.rotation = footTarget.lowerLeg.bone.targetRotation; //Quaternion.identity; //target.confidence.rotation = 0.5F; target.transform.position = GetTargetPosition(sensorComponent.transform); target.confidence.position = sensorComponent.positionConfidence; }