place_actor_on_terrain
Place an actor on landscape terrain by sampling the heightmap at its XY, then set its Z so the mesh bottom or origin sits at ground height plus an optional offset.
Instructions
Ground an actor on the landscape by sampling the heightmap at its XY (no line trace; traces miss the landscape headless). Sets the actor's Z so either its mesh bbox bottom or its origin sits at the sampled height + z_offset.
Returns: { actor: actor JSON, landed_z: number (sampled ground world-Z), previous_z: number, new_z: number, sampled_from: 'heightmap', in_bounds: bool, align: string, align_used: string, z_offset: number, landscape_actor_name: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| align | No | Optional 'mesh_bbox_bottom' (default; drops the lowest mesh-geometry point onto the ground) or 'actor_origin' (puts the actor origin at the ground) | |
| z_offset | No | Optional extra world-Z added above the sampled ground height; defaults to 0 | |
| actor_name | Yes | Internal name of the actor to place (Actor->GetName()) |