VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
void AVR.Avatar.AVR_PoseProvider.GetLeanTransform ( out Quaternion  rot,
out Vector3  pos 
)
inlineprivate

Definition at line 379 of file AVR_PoseProvider.cs.

379  {
380  //Lean position is the same as standing upright, but instead of straight down we go downwards by MainCamera.transform.down
381  Vector3 NeckPos = eyeTransform.position + eyeTransform.TransformVector(local_eye_to_neck_offset);
382 
383  pos = NeckPos + neck_body_distance * -playerRig.MainCamera.transform.up;
384 
385  rot = CorrectBodyYawAngle(Quaternion.LookRotation(eyeTransform.forward, NeckPos - pos));
386  }
Quaternion CorrectBodyYawAngle(Quaternion rot)
Vector3 local_eye_to_neck_offset
Local offset vector from eyes to neck
float neck_body_distance
Distance between neck and body/torso