append_mesh_primitive
Adds Box, Sphere, Cylinder, or Cone primitives to a DynamicMeshActor's live mesh without replacing existing geometry, ideal for iterative editor mesh building.
Instructions
Append a Box, Sphere, Cylinder or Cone to the live dynamic mesh of a DynamicMeshActor in the editor world, keeping the geometry already there: size is the box edge or the diameter and height of the round shapes, centred at location in mesh-local space. Each call adds another copy, inside an editor transaction; nothing is saved to an asset. An unknown actor or primitive is an error; appended is true when the triangle count grew. To merge another actor's mesh use append_mesh_to_dynamic_mesh; to persist the result, copy_dynamic_mesh_to_static_mesh.
Returns: { actor_name: string, primitive: string, size: number, material_id: int, triangle_count: int, triangles_added: int, vertex_count: int, appended: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Dominant dimension in cm, default 100 | |
| location | No | Optional local [x, y, z] offset for the primitive | |
| primitive | No | Box, Sphere, Cylinder, or Cone, default Box | |
| actor_name | Yes | Label or name of the target DynamicMeshActor | |
| dimensions | No | Fallback alias for size when size is omitted (cm) | |
| material_id | No | Optional MaterialID stamped on the appended triangles (default 0). Non-zero enables the mesh MaterialID attribute first, so a later copy_dynamic_mesh_to_static_mesh (bUseSectionMaterials=true) emits this piece as its own section/material slot. This is how one dynamic mesh becomes a multi-slot static mesh. |