public void Initialize(int fingerId, FingerData data, HandController handController, FingerRaycaster fingerRaycaster) { if (_isInitialized) { return; } FingerId = fingerId; FingerData = data; HandController = handController; _raycaster = fingerRaycaster; Set(); _isInitialized = true; }
private void Start() { poseState = PoseState.Rest; if (!HandController) { HandController = GetComponentInParent <HandController>(); } if (!_raycaster) { _raycaster = GetComponent <FingerRaycaster>(); } InitialRotations = new Quaternion[_bones.Length]; _phalanxOnFinalRotation = new bool[_bones.Length]; for (int i = 0; i < _bones.Length; i++) { InitialRotations[i] = _bones[i].localRotation; Debug.Log(_bones[i].localRotation + " " + InitialRotations[i]); } }