# CreateObjectFromObjectMesh

## Description

Creates an object by copying a single mesh from another object. An object can contain many meshes, and using CloneObject would copy them all. Use this command if you only want to copy a single mesh. Mesh indices are in the range 1 to GetObjectNumMeshes inclusive.

## Definition

CreateObjectFromObjectMesh( objID, fromObjID, meshIndex )

void agk::CreateObjectFromObjectMesh( UINT objID, UINT fromObjID, UINT meshIndex )

integer CreateObjectFromObjectMesh( fromObjID, meshIndex )

UINT agk::CreateObjectFromObjectMesh( UINT fromObjID, UINT meshIndex )

## Parameters

- objID - The ID of the new object
- fromObjID - The ID of the object that contains the mesh to copy
- meshIndex - The index of the mesh to copy