Provides a render object of the upper body, without the head. Unlike BodyMesh which handles the whole body, this model is optimized to work better with FaceMesh and selfie use cases.

function createUpperBodyRenderObjectProvider() {
var upperBodyProvider = global.scene.createResourceProvider("Provider.UpperBodyRenderObjectProvider");
upperBodyProvider.faceIndex = script.faceIndex;
return upperBodyProvider;
}

// 3D Upper Body Mesh
var meshVisual = script.getSceneObject().getComponent("Component.RenderMeshVisual");
meshVisual.mesh = global.assetSystem.createAsset("Asset.RenderMesh");
meshVisual.mesh.control = createUpperBodyRenderObjectProvider();
meshVisual.addMaterial(script.material);

Hierarchy (View Summary, Expand)

Constructors

Properties

faceIndex: number

The index of the face whose upper body you want to render. The first face detected is 0, the second 1, and so on.

Methods

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

MMNEPVFCICPMFPCPTTAAATR