set_mesh_uvs_from_projection
Replace UVs on a DynamicMeshActor's live mesh using box, plane, or cylinder projection, optionally limited to a region.
Instructions
Replace the UVs of one channel on a DynamicMeshActor's live dynamic mesh in the editor world with a box, plane or cylinder projection, optionally only inside a region. Box suits plank-and-post geometry (each face takes the axis it faces), plane only flat pieces, cylinder wrapped shapes. Returns triangles_affected and applied.
Returns: { actor_name, projection, uv_channel, region, triangles_affected: int, uv_channel_count: int, applied: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | [x,y,z] size of the projection shape (default [100,100,100]). THIS IS THE UV DENSITY KNOB: bigger scale = texture repeats fewer times. A tileable material that reads too big or too small is fixed here, not in the material. | |
| center | No | Region parameter (box/sphere centre, plane origin). | |
| extent | No | Region parameter: box HALF-size. | |
| invert | No | Select the complement of a box, sphere, plane or normal_angle region (default false); the other regions ignore it. | |
| normal | No | Region parameter: plane/normal_angle direction. | |
| radius | No | Region parameter: sphere radius. | |
| region | No | Optional region to limit the projection to; same vocabulary as select_mesh_triangles (default 'all'). | |
| location | No | Local [x,y,z] origin of the projection shape (default the mesh origin). | |
| rotation | No | PREFERRED: the OBJECT {"roll":R,"pitch":P,"yaw":Y} (any subset, absent axes are 0). The ARRAY form below is [pitch, yaw, roll] -- its index 2 is ROLL, NOT yaw, which once put a PlayerStart on its side. [pitch, yaw, roll] of the projection shape (default none). For 'plane', this is what chooses which way the plane faces. | |
| actor_name | Yes | Label or name of the target DynamicMeshActor. | |
| projection | No | 'box' (default) | 'plane' | 'cylinder'. | |
| uv_channel | No | UV channel to write (default 0). | |
| split_angle | No | cylinder only: angle in degrees at which the wrap is split (default 45). | |
| polygroup_id | No | Region parameter for region='polygroup'. | |
| max_angle_deg | No | Region parameter for region='normal_angle'. | |
| component_index | No | Island index when region='connected_component'. | |
| polygroup_layer | No | Region parameter for region='polygroup': extended polygroup layer index (default the mesh's default polygroup layer). | |
| source_material_id | No | Region parameter for region='material_id'. | |
| min_triangle_points | No | Region parameter, 1-3. | |
| min_island_tri_count | No | box only: islands smaller than this are merged into a neighbour (default 2). |