예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
        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;
        }