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.
BodyMesh
FaceMesh
function createUpperBodyRenderObjectProvider() { var upperBodyProvider = global.scene.createResourceProvider("Provider.UpperBodyRenderObjectProvider"); upperBodyProvider.faceIndex = script.faceIndex; return upperBodyProvider;}// 3D Upper Body Meshvar meshVisual = script.getSceneObject().getComponent("Component.RenderMeshVisual");meshVisual.mesh = global.assetSystem.createAsset("Asset.RenderMesh");meshVisual.mesh.control = createUpperBodyRenderObjectProvider();meshVisual.addMaterial(script.material); Copy
function createUpperBodyRenderObjectProvider() { var upperBodyProvider = global.scene.createResourceProvider("Provider.UpperBodyRenderObjectProvider"); upperBodyProvider.faceIndex = script.faceIndex; return upperBodyProvider;}// 3D Upper Body Meshvar meshVisual = script.getSceneObject().getComponent("Component.RenderMeshVisual");meshVisual.mesh = global.assetSystem.createAsset("Asset.RenderMesh");meshVisual.mesh.control = createUpperBodyRenderObjectProvider();meshVisual.addMaterial(script.material);
The index of the face whose upper body you want to render. The first face detected is 0, the second 1, and so on.
0
1
Returns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
other
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 withFaceMesh
and selfie use cases.Example