コード例 #1
0
        public override void Start(HumanoidControl _humanoid, Transform targetTransform)
        {
            base.Start(_humanoid, targetTransform);
            optitrackTracker = handTarget.humanoid.optitrack;
            tracker          = optitrackTracker;

            if (handTarget.isLeft)
            {
                shoulderBoneID = Bone.LeftShoulder;
                upperArmBoneID = Bone.LeftUpperArm;
                forearmBoneID  = Bone.LeftForearm;
                handBoneID     = Bone.LeftHand;
            }
            else
            {
                shoulderBoneID = Bone.RightShoulder;
                upperArmBoneID = Bone.RightUpperArm;
                forearmBoneID  = Bone.RightForearm;
                handBoneID     = Bone.RightHand;
            }

            if (sensorTransform != null)
            {
                optitrackRigidbody = sensorTransform.GetComponent <OptitrackRigidbodyComponent>();
                if (optitrackRigidbody != null)
                {
                    optitrackRigidbody.StartComponent(tracker.trackerTransform);
                }
            }
        }
コード例 #2
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);
                }
            }
        }
コード例 #3
0
            public TrackerProps(SerializedObject serializedObject, HumanoidControl_Editor.HumanoidTargetObjs targetObjs, OptiTracker _optiTracker)
                : base(serializedObject, targetObjs, _optiTracker, "optitrack")
            {
                optiTracker = _optiTracker;
                tracker     = optiTracker;

                trackingTypeProp = serializedObject.FindProperty("optitrack.trackingType");
                skeletonNameProp = serializedObject.FindProperty("optitrack.skeletonName");
            }
コード例 #4
0
 public override void Init(HeadTarget _headTarget)
 {
     base.Init(_headTarget);
     if (headTarget.humanoid != null)
     {
         optitrackTracker = headTarget.humanoid.optitrack;
         tracker          = optitrackTracker;
     }
 }
コード例 #5
0
        public override void Start(HumanoidControl _humanoid, Transform _targetTransform)
        {
            base.Start(_humanoid, _targetTransform);
            humanoid = _humanoid;

            tracker = humanoid.optitrack;

            streamingClient = tracker.streamingClient;

            targetTransform = _targetTransform;
        }
コード例 #6
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);
                }
            }
        }
コード例 #7
0
 public override void Init(HandTarget _handTarget)
 {
     base.Init(_handTarget);
     optitrackTracker = handTarget.humanoid.optitrack;
     tracker          = optitrackTracker;
 }
コード例 #8
0
 public override void Init(FootTarget _footTarget)
 {
     base.Init(_footTarget);
     optitrackTracker = footTarget.humanoid.optitrack;
     tracker          = optitrackTracker;
 }