private void UpdateSkeleton() { float confidence = 1; handTarget.shoulder.target.transform.position = optitrackTracker.GetTargetPosition(shoulderBoneID); handTarget.shoulder.target.confidence.position = confidence; handTarget.shoulder.target.transform.rotation = optitrackTracker.GetTargetRotation(shoulderBoneID); handTarget.shoulder.target.confidence.rotation = confidence; handTarget.upperArm.target.transform.position = optitrackTracker.GetTargetPosition(upperArmBoneID); handTarget.upperArm.target.confidence.position = confidence; handTarget.upperArm.target.transform.rotation = optitrackTracker.GetTargetRotation(upperArmBoneID); handTarget.upperArm.target.confidence.rotation = confidence; handTarget.forearm.target.transform.position = optitrackTracker.GetTargetPosition(forearmBoneID); handTarget.forearm.target.confidence.position = confidence; handTarget.forearm.target.transform.rotation = optitrackTracker.GetTargetRotation(forearmBoneID); handTarget.forearm.target.confidence.rotation = confidence; handTarget.hand.target.transform.position = optitrackTracker.GetTargetPosition(handBoneID); handTarget.hand.target.confidence.position = confidence; handTarget.hand.target.transform.rotation = optitrackTracker.GetTargetRotation(handBoneID); handTarget.hand.target.confidence.rotation = confidence; UpdateHand(); }
private void UpdateSkeleton() { float confidence = 1; headTarget.neck.target.transform.position = optitrackTracker.GetTargetPosition(Bone.Neck); headTarget.neck.target.confidence.position = confidence; headTarget.neck.target.transform.rotation = optitrackTracker.GetTargetRotation(Bone.Neck); headTarget.neck.target.confidence.rotation = confidence; headTarget.head.target.transform.position = optitrackTracker.GetTargetPosition(Bone.Head); headTarget.head.target.confidence.position = confidence; headTarget.head.target.transform.rotation = optitrackTracker.GetTargetRotation(Bone.Head); headTarget.head.target.confidence.rotation = confidence; }