unreal.PhysicsControlBPLibrary

class unreal.PhysicsControlBPLibrary(outer: Object | None = None, name: Name | str = 'None')

Bases: BlueprintFunctionLibrary

Physics Control BPLibrary

C++ Source:

  • Plugin: PhysicsControl

  • Module: PhysicsControl

  • File: PhysicsControlBPLibrary.h

classmethod add_control_parameters(parameters, name, control_data) -> (parameters=PhysicsControlControlAndModifierParameters, out_parameters=PhysicsControlControlAndModifierParameters)

Add a single control parameter to a container of parameters.

Parameters:
Returns:

parameters (PhysicsControlControlAndModifierParameters):

out_parameters (PhysicsControlControlAndModifierParameters):

Return type:

tuple

classmethod add_modifier_parameters(parameters, name, modifier_data) -> (parameters=PhysicsControlControlAndModifierParameters, out_parameters=PhysicsControlControlAndModifierParameters)

Add a single body modifier parameter to a container of parameters.

Parameters:
Returns:

parameters (PhysicsControlControlAndModifierParameters):

out_parameters (PhysicsControlControlAndModifierParameters):

Return type:

tuple

classmethod add_multiple_control_parameters(parameters, names, control_data) -> (parameters=PhysicsControlControlAndModifierParameters, out_parameters=PhysicsControlControlAndModifierParameters)

Add an array of control parameters (all with the same data) to a container of parameters.

Parameters:
Returns:

parameters (PhysicsControlControlAndModifierParameters):

out_parameters (PhysicsControlControlAndModifierParameters):

Return type:

tuple

classmethod add_multiple_modifier_parameters(parameters, names, modifier_data) -> (parameters=PhysicsControlControlAndModifierParameters, out_parameters=PhysicsControlControlAndModifierParameters)

Add an array of body modifier parameters to a container of parameter.

Parameters:
Returns:

parameters (PhysicsControlControlAndModifierParameters):

out_parameters (PhysicsControlControlAndModifierParameters):

Return type:

tuple

classmethod blend_control_parameters_through_set(parameters, start_control_parameters, end_control_parameters, control_names) -> (parameters=PhysicsControlControlAndModifierParameters, out_parameters=PhysicsControlControlAndModifierParameters)

Adds control parameters to the output parameters for each control name in the supplied array. The values in each control parameters added will be a linear interpolation of the two supplied Parameters, blending from the start parameters to the end parameters across the elements in the array. Note that this is most likely only useful when the control names are in order - for example going down a limb.

Parameters:
Returns:

parameters (PhysicsControlControlAndModifierParameters):

out_parameters (PhysicsControlControlAndModifierParameters):

Return type:

tuple

classmethod blend_modifier_parameters_through_set(parameters, start_modifier_parameters, end_modifier_parameters, modifier_names) -> (parameters=PhysicsControlControlAndModifierParameters, out_parameters=PhysicsControlControlAndModifierParameters)

Adds body modifier parameters to the output parameters for each modifier name in the supplied array. The values in each modifier parameters added will be a linear interpolation of the two supplied parameters, blending from the start parameters to the end parameters across the elements in the array. Note that this is most likely only useful when the modifier names are in order - for example going down a limb.

Parameters:
Returns:

parameters (PhysicsControlControlAndModifierParameters):

out_parameters (PhysicsControlControlAndModifierParameters):

Return type:

tuple

classmethod blend_parameters(parameters_a, parameters_b, interpolation_weight) -> (parameters_a=PhysicsControlControlAndModifierParameters, parameters_b=PhysicsControlControlAndModifierParameters, out_parameters=PhysicsControlControlAndModifierParameters)

Returns the linear interpolation of two sets of parameters. Any parameters that exist in one of the input sets but not the other will be added to the output with a weight of 1.

Parameters:
Returns:

parameters_a (PhysicsControlControlAndModifierParameters):

parameters_b (PhysicsControlControlAndModifierParameters):

out_parameters (PhysicsControlControlAndModifierParameters):

Return type:

tuple

classmethod convert_to_rigid_body_with_control(node) -> (RigidBodyWithControlReference, result=AnimNodeReferenceConversionResult)

Get a Rigid Body With Control node reference from an anim node reference

Parameters:

node (AnimNodeReference)

Returns:

result (AnimNodeReferenceConversionResult):

Return type:

AnimNodeReferenceConversionResult

classmethod convert_to_rigid_body_with_control_pure(node) -> (rigid_body_with_control=RigidBodyWithControlReference, result=bool)

Get a Rigid Body With Control node from an anim node (pure)

Parameters:

node (AnimNodeReference)

Returns:

rigid_body_with_control (RigidBodyWithControlReference):

result (bool):

Return type:

tuple

classmethod disable_collision_between_bodies(first_component, first_bone_name, second_component, second_bone_name) bool

Disables collision between two physics bodies at runtime. Works for two bones on the same skeletal mesh, a skeletal-mesh bone vs. a separate primitive, or two unrelated primitives.

Notes: - Both bodies must be in the same physics scene / solver. - Both bodies must be dynamic or kinematic; static particles are not supported by the

underlying Chaos ignore-collision manager.

  • The effect is transient: it does not survive body re-creation (LOD swap, SetSkeletalMesh, SetPhysicsAsset, physics-state teardown). To restore the disable after such an event, call the function again.

Returns true on success; false on validation failure (null component, missing bone, mismatched solvers, static body, etc.) - a warning is logged in that case.

Parameters:
Return type:

bool

classmethod disable_collision_between_body_arrays(first_component, first_bone_names, second_component, second_bone_names) bool

Bulk variant of DisableCollisionBetweenBodies. Disables collision for every (FirstBoneNames[i], SecondBoneNames[j]) combination in a single call. An empty bone array, or if the bone name is blank/None, means “use the component’s single body” (e.g. for a static-mesh component) and is treated as a one-element array of NAME_None. Self-pairs (the same body on both sides) are skipped. See DisableCollisionBetweenBodies for the constraints that apply per pair.

Returns true only when every pair was applied successfully. Per-pair validation failures log a warning and are skipped. The remaining valid pairs are still applied, and the return value is false to signal partial application.

Parameters:
Return type:

bool

classmethod enable_collision_between_bodies(first_component, first_bone_name, second_component, second_bone_name) bool

Re-enables collision between two physics bodies that was previously suppressed by DisableCollisionBetweenBodies. Works for two bones on the same skeletal mesh, a skeletal-mesh bone vs. a separate primitive, or two unrelated primitives. Calling this for a pair that is not currently disabled is a no-op.

Notes: - Both bodies must be in the same physics scene / solver. - Both bodies must be dynamic or kinematic; static particles are not supported by the

underlying Chaos ignore-collision manager.

  • Body re-creation (LOD swap, SetSkeletalMesh, SetPhysicsAsset, physics-state teardown) already restores default collision, so this call is only needed to undo a still-live DisableCollisionBetweenBodies.

Returns true on success; false on validation failure (null component, missing bone, mismatched solvers, static body, etc.) - a warning is logged in that case.

Parameters:
Return type:

bool

classmethod enable_collision_between_body_arrays(first_component, first_bone_names, second_component, second_bone_names) bool

Bulk variant of EnableCollisionBetweenBodies. Re-enables collision for every (FirstBoneNames[i], SecondBoneNames[j]) combination in a single call. An empty bone array, or if the bone name is blank/None, means “use the component’s single body” (e.g. for a static-mesh component) and is treated as a one-element array of NAME_None. Self-pairs and pairs that aren’t currently disabled are no-ops. See EnableCollisionBetweenBodies for the constraints that apply per pair.

Returns true only when every pair was applied successfully. Per-pair validation failures log a warning and are skipped. The remaining valid pairs are still applied, and the return value is false to signal partial application.

Parameters:
Return type:

bool

classmethod get_body_modifier_names_in_set(rigid_body_with_control, set_name) Array[Name]

Get the names of all the body modifiers in a specified set managed by this Rigid Body With Control node.

Parameters:
Return type:

Array[Name]

classmethod get_control_names_in_set(rigid_body_with_control, set_name) Array[Name]

Get the names of all the controls in a specified set managed by this Rigid Body With Control node.

Parameters:
Return type:

Array[Name]

classmethod set_override_physics_asset(node, physics_asset) RigidBodyWithControlReference

Set the physics asset on the Rigid Body With Control anim graph node.

Parameters:
Return type:

RigidBodyWithControlReference