/// <summary>
        /// Assigns provided controller to all hand parts
        /// </summary>
        /// <param name="controller"></param>
        public void SetController(HandPhysicsController controller)
        {
            var allParts = GetAll();

            for (int i = 0; i < allParts.Length; i++)
            {
                allParts[i].Controller = controller;
            }
        }
Ejemplo n.º 2
0
        public void Attach(HandPhysicsController controller, ObjectDetached onObjectDetached)
        {
            Controller = controller;

            Joint = gameObject.AddComponent <FixedJoint>();
            Joint.connectedBody = Controller.Parts.Wrist.Rigidbody;
            Joint.breakForce    = Controller.Fingers.ForceToDetachObject;

            OnObjectDetached = onObjectDetached;
        }
 void Start()
 {
     _handController = GetComponent <HandPhysicsController>();
 }
Ejemplo n.º 4
0
 void Start()
 {
     myo             = myoGameObject.GetComponent <ThalmicMyo>();
     _handController = GetComponent <HandPhysicsController>();
 }