unreal.ConstraintInstanceBlueprintLibrary

class unreal.ConstraintInstanceBlueprintLibrary(outer=None, name='None')

Bases: unreal.BlueprintFunctionLibrary

Constraint Instance Blueprint Library

C++ Source:

  • Module: Engine

  • File: ConstraintInstanceBlueprintLibrary.h

classmethod copy_params(accessor, source_accessor, keep_position=True, keep_rotation=True) -> (accessor=ConstraintInstanceAccessor, source_accessor=ConstraintInstanceAccessor)

Copies all properties from one constraint to another

Parameters
Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to write to

source_accessor (ConstraintInstanceAccessor): Constraint accessor to read from

Return type

tuple

classmethod get_angular_breakable(accessor) -> (accessor=ConstraintInstanceAccessor, angular_breakable=bool, angular_break_threshold=float)

Gets Constraint Angular Breakable properties

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

angular_breakable (bool): Whether it is possible to break the joint with angular force

angular_break_threshold (float): Torque needed to break the joint

Return type

tuple

classmethod get_angular_drive_mode(accessor) -> (accessor=ConstraintInstanceAccessor, out_drive_mode=AngularDriveMode)

Gets the angular drive mode ( SLERP or Twist And Swing)

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_drive_mode (AngularDriveMode): The angular drive mode to use. SLERP uses shortest spherical path, but will not work if any angular constraints are locked. Twist and Swing decomposes the path into the different angular degrees of freedom but may experience gimbal lock

Return type

tuple

classmethod get_angular_drive_params(accessor) -> (accessor=ConstraintInstanceAccessor, out_position_strength=float, out_velocity_strength=float, out_force_limit=float)

Gets the drive params for the angular drive.

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_position_strength (float): Positional strength for the drive (stiffness)

out_velocity_strength (float): Velocity strength of the drive (damping)

out_force_limit (float): Max force applied by the drive

Return type

tuple

classmethod get_angular_limits(accessor) -> (accessor=ConstraintInstanceAccessor, swing1_motion_type=AngularConstraintMotion, swing1_limit_angle=float, swing2_motion_type=AngularConstraintMotion, swing2_limit_angle=float, twist_motion_type=AngularConstraintMotion, twist_limit_angle=float)

Gets Constraint Angular Motion Ranges

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

swing1_motion_type (AngularConstraintMotion): Type of swing motion ( first axis )

swing1_limit_angle (float): Size of limit in degrees in [0, 180] range

swing2_motion_type (AngularConstraintMotion): Type of swing motion ( second axis )

swing2_limit_angle (float): Size of limit in degrees in [0, 180] range

twist_motion_type (AngularConstraintMotion): Type of twist motion

twist_limit_angle (float): Size of limit in degrees in [0, 180] range

Return type

tuple

classmethod get_angular_orientation_target(accessor) -> (accessor=ConstraintInstanceAccessor, out_pos_target=Rotator)

Gets the target orientation for the angular drive.

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_pos_target (Rotator): Target orientation

Return type

tuple

classmethod get_angular_plasticity(accessor) -> (accessor=ConstraintInstanceAccessor, angular_plasticity=bool, angular_plasticity_threshold=float)

Sets Constraint Angular Plasticity properties

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

angular_plasticity (bool): Whether it is possible to reset the target angle from the angular displacement

angular_plasticity_threshold (float): Degrees needed to reset the rest state of the joint

Return type

tuple

classmethod get_angular_soft_swing_limit_params(accessor) -> (accessor=ConstraintInstanceAccessor, soft_swing_limit=bool, swing_limit_stiffness=float, swing_limit_damping=float, swing_limit_restitution=float, swing_limit_contact_distance=float)

Gets Constraint Angular Soft Swing Limit parameters

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query *

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query *

soft_swing_limit (bool): True is the swing limit is soft

swing_limit_stiffness (float): Stiffness of the soft swing limit. Only used when Soft limit is on ( positive value )

swing_limit_damping (float): Damping of the soft swing limit. Only used when Soft limit is on ( positive value )

swing_limit_restitution (float): Controls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead.

swing_limit_contact_distance (float): Determines how close to the limit we have to get before turning the joint on. Larger value will be more expensive, but will do a better job not violating constraints. A smaller value will be more efficient, but easier to violate.

Return type

tuple

classmethod get_angular_soft_twist_limit_params(accessor) -> (accessor=ConstraintInstanceAccessor, soft_twist_limit=bool, twist_limit_stiffness=float, twist_limit_damping=float, twist_limit_restitution=float, twist_limit_contact_distance=float)

Gets Constraint Angular Soft Twist Limit parameters

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query *

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query *

soft_twist_limit (bool): True is the Twist limit is soft

twist_limit_stiffness (float): Stiffness of the soft Twist limit. Only used when Soft limit is on ( positive value )

twist_limit_damping (float): Damping of the soft Twist limit. Only used when Soft limit is on ( positive value )

twist_limit_restitution (float): Controls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead.

twist_limit_contact_distance (float): Determines how close to the limit we have to get before turning the joint on. Larger value will be more expensive, but will do a better job not violating constraints. A smaller value will be more efficient, but easier to violate.

Return type

tuple

classmethod get_angular_velocity_drive_slerp(accessor) -> (accessor=ConstraintInstanceAccessor, out_enable_slerp=bool)

Gets whether the angular velocity slerp drive is enabled or not. Only relevant if the AngularDriveMode is set to SLERP

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_enable_slerp (bool): Indicates whether the SLERP drive is enabled. Only relevant if the AngularDriveMode is set to SLERP

Return type

tuple

classmethod get_angular_velocity_drive_twist_and_swing(accessor) -> (accessor=ConstraintInstanceAccessor, out_enable_twist_drive=bool, out_enable_swing_drive=bool)

Gets whether angular velocity twist and swing drive is enabled or not. Only relevant if the AngularDriveMode is set to Twist and Swing

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_enable_twist_drive (bool): Indicates whether the drive for the twist axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

out_enable_swing_drive (bool): Indicates whether the drive for the swing axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

Return type

tuple

classmethod get_angular_velocity_target(accessor) -> (accessor=ConstraintInstanceAccessor, out_vel_target=Vector)

Gets the target velocity for the angular drive.

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_vel_target (Vector): Target velocity

Return type

tuple

classmethod get_attached_body_names(accessor) -> (accessor=ConstraintInstanceAccessor, parent_body=Name, child_body=Name)

Gets Attached body names

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

parent_body (Name): Parent body name of the constraint

child_body (Name): Child body name of the constraint

Return type

tuple

classmethod get_contact_transfer_scale(accessor) -> (accessor=ConstraintInstanceAccessor, contact_transfer_scale=float)

Gets Constraint Contact Transfer Scale properties

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

contact_transfer_scale (float): Scale for transfer of child energy to parent.

Return type

tuple

classmethod get_disable_collsion(accessor) ConstraintInstanceAccessor or None

Gets whether bodies attched to the constraint can collide or not

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

Return type

ConstraintInstanceAccessor or None

classmethod get_linear_breakable(accessor) -> (accessor=ConstraintInstanceAccessor, linear_breakable=bool, linear_break_threshold=float)

Gets Constraint Linear Breakable properties

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

linear_breakable (bool): Whether it is possible to break the joint with linear force

linear_break_threshold (float): Force needed to break the joint

Return type

tuple

classmethod get_linear_drive_params(accessor) -> (accessor=ConstraintInstanceAccessor, out_position_strength=float, out_velocity_strength=float, out_force_limit=float)

Gets the drive params for the linear drive.

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_position_strength (float): Positional strength for the drive (stiffness)

out_velocity_strength (float): Velocity strength of the drive (damping)

out_force_limit (float): Max force applied by the drive

Return type

tuple

classmethod get_linear_limits(accessor) -> (accessor=ConstraintInstanceAccessor, x_motion=LinearConstraintMotion, y_motion=LinearConstraintMotion, z_motion=LinearConstraintMotion, limit=float)

Gets Constraint Linear Motion Ranges

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

x_motion (LinearConstraintMotion): Type of motion along the X axis

y_motion (LinearConstraintMotion): Type of motion along the Y axis

z_motion (LinearConstraintMotion): Type of motion along the Z axis

limit (float): linear limit applied to all axis

Return type

tuple

classmethod get_linear_plasticity(accessor) -> (accessor=ConstraintInstanceAccessor, linear_plasticity=bool, linear_plasticity_threshold=float, plasticity_type=ConstraintPlasticityType)

Gets Constraint Linear Plasticity properties

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

linear_plasticity (bool):

linear_plasticity_threshold (float):

plasticity_type (ConstraintPlasticityType):

Return type

tuple

classmethod get_linear_position_drive(accessor) -> (accessor=ConstraintInstanceAccessor, out_enable_drive_x=bool, out_enable_drive_y=bool, out_enable_drive_z=bool)

Gets whether linear position drive is enabled or not

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_enable_drive_x (bool): Indicates whether the drive for the X-Axis is enabled

out_enable_drive_y (bool): Indicates whether the drive for the Y-Axis is enabled

out_enable_drive_z (bool): Indicates whether the drive for the Z-Axis is enabled

Return type

tuple

classmethod get_linear_position_target(accessor) -> (accessor=ConstraintInstanceAccessor, out_pos_target=Vector)

Gets the target position for the linear drive.

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_pos_target (Vector): Target position

Return type

tuple

classmethod get_linear_soft_limit_params(accessor) -> (accessor=ConstraintInstanceAccessor, soft_linear_limit=bool, linear_limit_stiffness=float, linear_limit_damping=float, linear_limit_restitution=float, linear_limit_contact_distance=float)

Gets Constraint Linear Soft Limit parameters

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query *

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query *

soft_linear_limit (bool): True is the Linear limit is soft

linear_limit_stiffness (float): Stiffness of the soft Linear limit. Only used when Soft limit is on ( positive value )

linear_limit_damping (float): Damping of the soft Linear limit. Only used when Soft limit is on ( positive value )

linear_limit_restitution (float): Controls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead.

linear_limit_contact_distance (float): Determines how close to the limit we have to get before turning the joint on. Larger value will be more expensive, but will do a better job not violating constraints. A smaller value will be more efficient, but easier to violate.

Return type

tuple

classmethod get_linear_velocity_drive(accessor) -> (accessor=ConstraintInstanceAccessor, out_enable_drive_x=bool, out_enable_drive_y=bool, out_enable_drive_z=bool)

Gets whether linear velocity drive is enabled or not

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_enable_drive_x (bool): Indicates whether the drive for the X-Axis is enabled

out_enable_drive_y (bool): Indicates whether the drive for the Y-Axis is enabled

out_enable_drive_z (bool): Indicates whether the drive for the Z-Axis is enabled

Return type

tuple

classmethod get_linear_velocity_target(accessor) -> (accessor=ConstraintInstanceAccessor, out_vel_target=Vector)

Gets the target velocity for the linear drive.

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_vel_target (Vector): Target velocity

Return type

tuple

classmethod get_orientation_drive_slerp(accessor) -> (accessor=ConstraintInstanceAccessor, out_enable_slerp=bool)

Gets whether the angular orientation slerp drive is enabled or not. Only relevant if the AngularDriveMode is set to SLERP

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_enable_slerp (bool): Indicates whether the SLERP drive should be enabled. Only relevant if the AngularDriveMode is set to SLERP

Return type

tuple

classmethod get_orientation_drive_twist_and_swing(accessor) -> (accessor=ConstraintInstanceAccessor, out_enable_twist_drive=bool, out_enable_swing_drive=bool)

Gets whether angular orientation drive are enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

out_enable_twist_drive (bool): Indicates whether the drive for the twist axis is enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

out_enable_swing_drive (bool): Indicates whether the drive for the swing axis is enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

Return type

tuple

classmethod get_parent_dominates(accessor) ConstraintInstanceAccessor or None

Gets whether the parent body is not affected by it’s child motion

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

Return type

ConstraintInstanceAccessor or None

classmethod get_projection_params(accessor) -> (accessor=ConstraintInstanceAccessor, enable_projection=bool, projection_linear_alpha=float, projection_angular_alpha=float)

Gets projection parameters of the constraint

Parameters

accessor (ConstraintInstanceAccessor) – Constraint accessor to query

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to query

enable_projection (bool): true to enable projection

projection_linear_alpha (float): how much linear projection to apply in [0,1] range

projection_angular_alpha (float): how much angular projection to apply in [0,1] range

Return type

tuple

classmethod set_angular_breakable(accessor, angular_breakable, angular_break_threshold) ConstraintInstanceAccessor

Sets Constraint Angular Breakable properties

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • angular_breakable (bool) – Whether it is possible to break the joint with angular force

  • angular_break_threshold (float) – Torque needed to break the joint

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_angular_drive_mode(accessor, drive_mode) ConstraintInstanceAccessor

Switches the angular drive mode between SLERP and Twist And Swing

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • drive_mode (AngularDriveMode) – The angular drive mode to use. SLERP uses shortest spherical path, but will not work if any angular constraints are locked. Twist and Swing decomposes the path into the different angular degrees of freedom but may experience gimbal lock

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_angular_drive_params(accessor, position_strength, velocity_strength, force_limit) ConstraintInstanceAccessor

Sets the drive params for the angular drive.

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • position_strength (float) – Positional strength for the drive (stiffness)

  • velocity_strength (float) – Velocity strength of the drive (damping)

  • force_limit (float) – Max force applied by the drive

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_angular_limits(accessor, swing1_motion_type, swing1_limit_angle, swing2_motion_type, swing2_limit_angle, twist_motion_type, twist_limit_angle) ConstraintInstanceAccessor

Sets COnstraint Angular Motion Ranges

Parameters
Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_angular_orientation_target(accessor, pos_target) ConstraintInstanceAccessor

Sets the target orientation for the angular drive.

Parameters
Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_angular_plasticity(accessor, angular_plasticity, angular_plasticity_threshold) ConstraintInstanceAccessor

Sets Constraint Angular Plasticity properties

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • angular_plasticity (bool) – Whether it is possible to reset the target angle from the angular displacement

  • angular_plasticity_threshold (float) – Degrees needed to reset the rest state of the joint

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_angular_soft_swing_limit_params(accessor, soft_swing_limit, swing_limit_stiffness, swing_limit_damping, swing_limit_restitution, swing_limit_contact_distance) ConstraintInstanceAccessor

Sets Constraint Angular Soft Swing Limit parameters

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change *

  • soft_swing_limit (bool) – True is the swing limit is soft

  • swing_limit_stiffness (float) – Stiffness of the soft swing limit. Only used when Soft limit is on ( positive value )

  • swing_limit_damping (float) – Damping of the soft swing limit. Only used when Soft limit is on ( positive value )

  • swing_limit_restitution (float) – Controls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead.

  • swing_limit_contact_distance (float) – Determines how close to the limit we have to get before turning the joint on. Larger value will be more expensive, but will do a better job not violating constraints. A smaller value will be more efficient, but easier to violate.

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change *

Return type

ConstraintInstanceAccessor

classmethod set_angular_soft_twist_limit_params(accessor, soft_twist_limit, twist_limit_stiffness, twist_limit_damping, twist_limit_restitution, twist_limit_contact_distance) ConstraintInstanceAccessor

Sets Constraint Angular Soft Twist Limit parameters

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change *

  • soft_twist_limit (bool) – True is the twist limit is soft

  • twist_limit_stiffness (float) – Stiffness of the soft Twist limit. Only used when Soft limit is on ( positive value )

  • twist_limit_damping (float) – Damping of the soft Twist limit. Only used when Soft limit is on ( positive value )

  • twist_limit_restitution (float) – Controls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead.

  • twist_limit_contact_distance (float) – Determines how close to the limit we have to get before turning the joint on. Larger value will be more expensive, but will do a better job not violating constraints. A smaller value will be more efficient, but easier to violate.

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change *

Return type

ConstraintInstanceAccessor

classmethod set_angular_velocity_drive_slerp(accessor, enable_slerp) ConstraintInstanceAccessor

Enables/Disables the angular velocity slerp drive. Only relevant if the AngularDriveMode is set to SLERP

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • enable_slerp (bool) – Indicates whether the SLERP drive should be enabled. Only relevant if the AngularDriveMode is set to SLERP

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_angular_velocity_drive_twist_and_swing(accessor, enable_twist_drive, enable_swing_drive) ConstraintInstanceAccessor

Enables/Disables angular velocity twist and swing drive. Only relevant if the AngularDriveMode is set to Twist and Swing

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • enable_twist_drive (bool) – Indicates whether the drive for the twist axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

  • enable_swing_drive (bool) – Indicates whether the drive for the swing axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_angular_velocity_target(accessor, vel_target) ConstraintInstanceAccessor

Sets the target velocity for the angular drive.

Parameters
Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_contact_transfer_scale(accessor, contact_transfer_scale) ConstraintInstanceAccessor

Set Contact Transfer Scale

Parameters
Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_disable_collision(accessor, disable_collision) ConstraintInstanceAccessor

Sets whether bodies attched to the constraint can collide or not

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • disable_collision (bool) – true to disable collision between constrained bodies

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_linear_breakable(accessor, linear_breakable, linear_break_threshold) ConstraintInstanceAccessor

Sets the Linear Breakable properties

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • linear_breakable (bool) – Whether it is possible to break the joint with linear force

  • linear_break_threshold (float) – Force needed to break the joint

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_linear_drive_params(accessor, position_strength, velocity_strength, force_limit) ConstraintInstanceAccessor

Sets the drive params for the linear drive.

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • position_strength (float) – Positional strength for the drive (stiffness)

  • velocity_strength (float) – Velocity strength of the drive (damping)

  • force_limit (float) – Max force applied by the drive

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_linear_limits(accessor, x_motion, y_motion, z_motion, limit) ConstraintInstanceAccessor

Sets Constraint Linear Motion Ranges

Parameters
Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_linear_plasticity(accessor, linear_plasticity, linear_plasticity_threshold, plasticity_type) ConstraintInstanceAccessor

Sets Constraint Linear Plasticity properties

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • linear_plasticity (bool) – Whether it is possible to reset the target position from the linear displacement

  • linear_plasticity_threshold (float) – Delta from target needed to reset the target joint

  • plasticity_type (ConstraintPlasticityType) –

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_linear_position_drive(accessor, enable_drive_x, enable_drive_y, enable_drive_z) ConstraintInstanceAccessor

Enables/Disables linear position drive

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • enable_drive_x (bool) – Indicates whether the drive for the X-Axis should be enabled

  • enable_drive_y (bool) – Indicates whether the drive for the Y-Axis should be enabled

  • enable_drive_z (bool) – Indicates whether the drive for the Z-Axis should be enabled

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_linear_position_target(accessor, pos_target) ConstraintInstanceAccessor

Sets the target position for the linear drive.

Parameters
Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_linear_soft_limit_params(accessor, soft_linear_limit, linear_limit_stiffness, linear_limit_damping, linear_limit_restitution, linear_limit_contact_distance) ConstraintInstanceAccessor

Sets Constraint Linear Soft Limit parameters

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change *

  • soft_linear_limit (bool) – True is the linear limit is soft

  • linear_limit_stiffness (float) – Stiffness of the soft linear limit. Only used when Soft limit is on ( positive value )

  • linear_limit_damping (float) – Damping of the soft linear limit. Only used when Soft limit is on ( positive value )

  • linear_limit_restitution (float) – Controls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead.

  • linear_limit_contact_distance (float) – Determines how close to the limit we have to get before turning the joint on. Larger value will be more expensive, but will do a better job not violating constraints. A smaller value will be more efficient, but easier to violate.

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change *

Return type

ConstraintInstanceAccessor

classmethod set_linear_velocity_drive(accessor, enable_drive_x, enable_drive_y, enable_drive_z) ConstraintInstanceAccessor

Enables/Disables linear velocity drive

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • enable_drive_x (bool) – Indicates whether the drive for the X-Axis should be enabled

  • enable_drive_y (bool) – Indicates whether the drive for the Y-Axis should be enabled

  • enable_drive_z (bool) – Indicates whether the drive for the Z-Axis should be enabled

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_linear_velocity_target(accessor, vel_target) ConstraintInstanceAccessor

Sets the target velocity for the linear drive.

Parameters
Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_orientation_drive_slerp(accessor, enable_slerp) ConstraintInstanceAccessor

Enables/Disables the angular orientation slerp drive. Only relevant if the AngularDriveMode is set to SLERP

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • enable_slerp (bool) – Indicates whether the SLERP drive should be enabled. Only relevant if the AngularDriveMode is set to SLERP

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_orientation_drive_twist_and_swing(accessor, enable_twist_drive, enable_swing_drive) ConstraintInstanceAccessor

Enables/Disables angular orientation drive. Only relevant if the AngularDriveMode is set to Twist and Swing

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • enable_twist_drive (bool) – Indicates whether the drive for the twist axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

  • enable_swing_drive (bool) – Indicates whether the drive for the swing axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_parent_dominates(accessor, parent_dominates) ConstraintInstanceAccessor

Sets whether the parent body is not affected by it’s child motion

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • parent_dominates (bool) – true to avoid the parent being affected by its child motion

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor

classmethod set_projection_params(accessor, enable_projection, projection_linear_alpha, projection_angular_alpha) ConstraintInstanceAccessor

Sets projection parameters of the constraint

Parameters
  • accessor (ConstraintInstanceAccessor) – Constraint accessor to change

  • enable_projection (bool) – true to enable projection

  • projection_linear_alpha (float) – how much linear projection to apply in [0,1] range

  • projection_angular_alpha (float) – how much angular projection to apply in [0,1] range

Returns

accessor (ConstraintInstanceAccessor): Constraint accessor to change

Return type

ConstraintInstanceAccessor