Ejemplo n.º 1
0
        public override void Start(HumanoidControl _humanoid, Transform targetTransform)
        {
            base.Start(_humanoid, targetTransform);
            optitrackTracker = footTarget.humanoid.optitrack;
            tracker          = optitrackTracker;

            if (footTarget.isLeft)
            {
                upperLegBoneID = Bone.LeftUpperLeg;
                lowerLegBoneID = Bone.LeftLowerLeg;
                footBoneID     = Bone.LeftFoot;
                toesBoneID     = Bone.LeftToes;
            }
            else
            {
                upperLegBoneID = Bone.RightUpperLeg;
                lowerLegBoneID = Bone.RightLowerLeg;
                footBoneID     = Bone.RightFoot;
                toesBoneID     = Bone.RightToes;
            }

            if (sensorTransform != null)
            {
                optitrackRigidbody = sensorTransform.GetComponent <OptitrackRigidbodyComponent>();
                if (optitrackRigidbody != null)
                {
                    optitrackRigidbody.StartComponent(tracker.trackerTransform);
                }
            }
        }
Ejemplo n.º 2
0
        protected override void CreateSensorTransform()
        {
            CreateSensorTransform(null, Vector3.zero, Quaternion.identity);

            OptitrackRigidbodyComponent optitrackRigidbody = sensorTransform.GetComponent <OptitrackRigidbodyComponent>();

            if (optitrackRigidbody == null)
            {
                sensorTransform.gameObject.AddComponent <OptitrackRigidbodyComponent>();
            }
        }
Ejemplo n.º 3
0
            protected static void CheckRigidbodyComponent(FootTarget footTarget)
            {
                if (footTarget.optitrack.sensorTransform == null)
                {
                    return;
                }

                OptitrackRigidbodyComponent sensorComponent = footTarget.optitrack.sensorTransform.GetComponent <OptitrackRigidbodyComponent>();

                if (sensorComponent == null)
                {
                    footTarget.optitrack.sensorTransform.gameObject.AddComponent <OptitrackRigidbodyComponent>();
                }
            }
Ejemplo n.º 4
0
        public override void Start(HumanoidControl _humanoid, Transform targetTransform)
        {
            base.Start(_humanoid, targetTransform);
            optitrackTracker = hipsTarget.humanoid.optitrack;
            tracker          = optitrackTracker;

            if (sensorTransform != null)
            {
                optitrackRigidbody = sensorTransform.GetComponent <OptitrackRigidbodyComponent>();
                if (optitrackRigidbody != null)
                {
                    optitrackRigidbody.StartComponent(tracker.trackerTransform);
                }
            }
        }
Ejemplo n.º 5
0
            private void OnEnable()
            {
                sensorComponent = (OptitrackRigidbodyComponent)target;

                streamingIdProp = serializedObject.FindProperty("streamingID");
            }