/// <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; } }
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>(); }
void Start() { myo = myoGameObject.GetComponent <ThalmicMyo>(); _handController = GetComponent <HandPhysicsController>(); }