set_physics_constraint_drives
Set linear/angular drives, breakable thresholds, projection, and collision on a physics constraint actor component to define joint behavior for simulation.
Instructions
Set linear/angular drives (motors), breakable thresholds, projection, and collision/dominance on a world APhysicsConstraintActor's UPhysicsConstraintComponent — the "behavior beyond limits" (read-modify-write; only provided fields change; idempotent set-to-fixed-value). Authoring-only: the values are written into the component's serialized ConstraintInstance template and persist; the live motor torque is only applied while simulating (PIE). Distinct from the UPhysicsAsset constraint drives (set_physics_asset_constraint_drives), which author a ragdoll joint inside an asset.
Returns: { constraint_actor_name: string, constraint_component: string, applied_count: int, angular_drive_mode: string, angular_orientation_drive: bool, angular_velocity_drive: bool, angular_drive_spring: number, angular_drive_damping: number, angular_drive_force_limit: number, angular_orientation_target: [number], linear_position_drive: bool, linear_velocity_drive: bool, linear_drive_spring: number, linear_drive_damping: number, linear_drive_force_limit: number, linear_position_target: [number], linear_breakable: bool, linear_break_threshold: number, angular_breakable: bool, angular_break_threshold: number, projection_enabled: bool, projection_linear_alpha: number, projection_angular_alpha: number, projection_linear_tolerance: number, projection_angular_tolerance: number, parent_dominates: bool, disable_collision: bool, constraint_broken: bool, note: string, updated: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| break_constraint | No | Optional: if true, immediately break the (live) constraint via BreakConstraint(). | |
| linear_breakable | No | Optional: the joint can break under linear force. | |
| parent_dominates | No | Optional: the parent body is unaffected by the child's motion. | |
| angular_breakable | No | Optional: the joint can break under angular force. | |
| disable_collision | No | Optional: disable collision between the two constrained bodies. | |
| angular_drive_mode | No | Optional angular drive mode: SLERP|TwistAndSwing (dispatches the orientation/velocity enable path). | |
| projection_enabled | No | Optional: enable projection (post-solve position/angle fixup). | |
| linear_drive_spring | No | Optional linear drive spring/stiffness. | |
| angular_drive_spring | No | Optional angular drive spring/stiffness. | |
| linear_drive_damping | No | Optional linear drive damping. | |
| angular_drive_damping | No | Optional angular drive damping. | |
| constraint_actor_name | Yes | Label/name of the APhysicsConstraintActor (as spawned by spawn_physics_constraint). | |
| linear_position_drive | No | Optional: enable the linear position drive (applied to all 3 axes). | |
| linear_velocity_drive | No | Optional: enable the linear velocity drive (all 3 axes). | |
| angular_velocity_drive | No | Optional: enable the angular velocity drive. | |
| linear_break_threshold | No | Optional linear break force threshold. | |
| linear_position_target | No | Optional [x, y, z] target position. | |
| angular_break_threshold | No | Optional angular break torque threshold. | |
| projection_linear_alpha | No | Optional semi-physical linear projection alpha [0..1]. | |
| linear_drive_force_limit | No | Optional linear drive force limit (0 = unlimited). | |
| projection_angular_alpha | No | Optional semi-physical angular projection alpha [0..1]. | |
| angular_drive_force_limit | No | Optional angular drive force/torque limit (0 = unlimited). | |
| angular_orientation_drive | No | Optional: enable the angular orientation (position) drive. | |
| angular_orientation_target | No | Optional [pitch, yaw, roll] target orientation in degrees. | |
| projection_linear_tolerance | No | Optional projection linear tolerance. | |
| projection_angular_tolerance | No | Optional projection angular tolerance in degrees. |