add_spring_arm
Attach a spring arm (camera boom) to an actor in the Unreal editor by name or label, configuring an existing arm or creating a new instance component. Use before adding a camera component.
Instructions
Add a USpringArmComponent (camera boom) to an actor placed in the editor world, found by name or label; if the actor already has a spring arm, that first one is configured instead, whatever its name, overwriting only the fields you pass. A new arm becomes an instance component attached to the root. One undo step; the level is marked dirty, not saved. Negative lengths, sizes and speeds clamp to 0; an unknown probe_channel is an error and nothing is created or written. Attach a camera with add_camera_component (parent_component = the returned component_name); for a Blueprint asset use add_component_to_blueprint.
Returns: { actor_name, component_name, already_existed, applied_count, target_arm_length, socket_offset: [x,y,z], target_offset: [x,y,z], probe_size, probe_channel, b_do_collision_test, b_use_pawn_control_rotation, b_inherit_pitch, b_inherit_yaw, b_inherit_roll, b_enable_camera_lag, b_enable_camera_rotation_lag, camera_lag_speed, camera_rotation_lag_speed }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor_name | Yes | Name or label of the target actor in the editor world. | |
| probe_size | No | Optional float. Collision probe radius. | |
| b_inherit_yaw | No | Optional bool. Inherit yaw from parent. | |
| probe_channel | No | Optional string name of ECollisionChannel (e.g. "Camera", "Visibility"). Default "Camera". | |
| socket_offset | No | Optional [X, Y, Z] relative offset applied at the spring-arm tip. | |
| target_offset | No | Optional [X, Y, Z] world-space offset applied at the start of the spring. | |
| b_inherit_roll | No | Optional bool. Inherit roll from parent. | |
| component_name | No | Optional name for a new component (defaults to "SpringArm"); a name another object of the actor already has gets a unique variant, returned in component_name. Ignored when the actor already has a spring arm, which is configured whatever its name. | |
| b_inherit_pitch | No | Optional bool. Inherit pitch from parent. | |
| camera_lag_speed | No | Optional float. Positional lag speed (units/sec). | |
| target_arm_length | No | Optional float. Natural length of the spring arm (uu). Default 300. | |
| b_do_collision_test | No | Optional bool. Enable camera collision probe. | |
| b_enable_camera_lag | No | Optional bool. Enable positional lag. | |
| camera_rotation_lag_speed | No | Optional float. Rotational lag speed (deg/sec). | |
| b_use_pawn_control_rotation | No | Optional bool. Use the parent pawn's view rotation. | |
| b_enable_camera_rotation_lag | No | Optional bool. Enable rotational lag. |