예제 #1
0
        public override void Start()
        {
            base.Start();
            _physicsHand = Hand as PhysicsHand;
            if (_physicsHand == null)
            {
                Debug.LogWarning("PhysicsWrist needs a PhysicsHand");
            }

            _phalange = HandFactory.GetPhalange(gameObject, 0, 0, DeviceType);
        }
예제 #2
0
        public override void Start()
        {
            base.Start();
            _selfRigidbody             = GetComponent <Rigidbody>();
            _selfRigidbody.constraints = RigidbodyConstraints.FreezeRotation;
            _physicsHand = Hand as PhysicsHand;
            if (_physicsHand == null)
            {
                Debug.LogWarning("PhysicsWrist needs a PhysicsHand");
            }

            _phalange = HandFactory.GetPhalange(gameObject, 0, 0, DeviceType);
        }
        public override void Start()
        {
            base.Start();
            //_thumbRigidbody = Phalanges[1].GetComponent<Rigidbody>();
            _physicsHand = Hand as PhysicsHand;
            if (_physicsHand == null)
            {
                Debug.LogError("Physics thumb only works with a physics hand");
            }
            // Get the thumb of the target hand
            ConfigureThumb(Phalanges[1]);

            AddHingeJoint(Phalanges[2], -Hand.WristTransform.right, _thumbRigidbody);
            _phalange = HandFactory.GetPhalange(Phalanges[2], Index, 2, DeviceType);
        }