API reference
API reference
Select your platform
No SDKs available
No versions available

OVRFace Class

Extends MonoBehaviour
OVR Component to drive blend shapes on a SkinnedMeshRenderer based on Face Tracking provided by OVRFaceExpressions.
Intended to be used as a base type that is inherited from, in order to provide mapping logic from blend shape indices. The mapping of OVRFaceExpressions.FaceExpression to blend shapes is accomplished by overriding OVRFace.GetFaceExpression(int). Needs to be linked to an OVRFaceExpressions component to fetch tracking data from.

Protected Properties

SkinnedMesh : SkinnedMeshRenderer
[Get]
Signature
SkinnedMeshRenderer OVRFace.SkinnedMesh

Properties

BlendShapeStrengthMultiplier : float
[Get][Set]
Signature
float OVRFace.BlendShapeStrengthMultiplier
FaceExpressions : OVRFaceExpressions
[Get][Set]
Start this instance.
Will validate that all properties are set correctly
Signature
OVRFaceExpressions OVRFace.FaceExpressions

Protected Methods

Awake ()
Signature
virtual void OVRFace.Awake()
Returns
void
GetFaceExpression ( blendShapeIndex )
Fetches the OVRFaceExpressions.FaceExpression for a given blend shape index on the shared mesh of the SkinnedMeshRenderer on the same component.
Override this function to provide the mapping between blend shapes and face expressions
Signature
virtual OVRFaceExpressions.FaceExpression OVRFace.GetFaceExpression(int blendShapeIndex)
Parameters
blendShapeIndex: int  The index of the blend shape, will be in-between 0 and the number of blend shapes on the shared mesh.
Returns
OVRFaceExpressions.FaceExpression  Returns the OVRFaceExpressions.FaceExpression to drive the bland shape identified by blendShapeIndex .
GetWeightValue ( blendShapeIndex , weightValue )
Calculates the value for the specific target blend shape of the shared mesh SkinnedMeshRenderer
Signature
virtual bool OVRFace.GetWeightValue(int blendShapeIndex, out float weightValue)
Parameters
blendShapeIndex: int  Index of the blend shape of the shared mesh SkinnedMeshRenderer
weightValue: out float  Calculated value
Returns
bool  true if value was calculated, false if no value available for that blend shape
Start ()
Signature
virtual void OVRFace.Start()
Returns
void
Update ()
Signature
virtual void OVRFace.Update()
Returns
void