private void LateUpdate() { if (isDetectingHand) { if (!materialSet) { ViveSR_DualCameraDepthCollider.ChangeColliderMaterial(handMaterial); materialSet = true; } Mesh handMesh = SRWorksHand.GetDynamicHandMesh(); if (handMesh != null) { Vector3 outNearPoint, outFarPoint; Quaternion handRot = Quaternion.identity; SRWorksHand.Instance._findHandFromVerticesUpdate2(handMesh.triangles, handMesh.vertices, out outNearPoint, out outFarPoint, out handRot); if (_handObjNear != null) { _handObjNear.transform.position = outNearPoint; _handObjNear.transform.rotation = handRot; } if (_handObjFar != null) { _handObjFar.transform.position = outFarPoint; _handObjFar.transform.rotation = handRot; } if (_handObjArm != null) { _handObjArm.transform.position = outNearPoint; _handObjArm.transform.forward = outFarPoint - outNearPoint; } } } }
private void Awake() { ShowDynamicCollision = false; ViveSR_DualCameraDepthCollider.ChangeColliderMaterial(CollisionMaterial); }