unreal.ConstraintProfileProperties

class unreal.ConstraintProfileProperties

Bases: unreal.StructBase

Container for properties of a physics constraint that can be easily swapped at runtime. This is useful for switching different setups when going from ragdoll to standup for example

C++ Source:

  • Module: Engine

  • File: ConstraintInstance.h

Editor Properties: (see get_editor_property/set_editor_property)

  • angular_break_threshold (float): [Read-Write] Angular Break Threshold: Torque needed to break the joint.

  • angular_breakable (bool): [Read-Write] Angular Breakable: Whether it is possible to break the joint with angular force.

  • angular_drive (AngularDriveConstraint): [Read-Write] Angular Drive

  • angular_plasticity (bool): [Read-Write] Angular Plasticity: Whether it is possible to reset target rotations from the angular displacement.

  • angular_plasticity_threshold (float): [Read-Write] Angular Plasticity Threshold: [Chaos Only] Degree threshold from target angle needed to reset the target angle.

  • cone_limit (ConeConstraint): [Read-Write] Cone Limit

  • contact_transfer_scale (float): [Read-Write] Contact Transfer Scale: [Chaos Only] Colliison transfer on parent from the joints child. Range is 0.0-MAX

  • disable_collision (bool): [Read-Write] Disable Collision: Disable collision between bodies joined by this constraint.

  • enable_angular_projection (bool): [Read-Write] Enable Angular Projection: NOTE: RigidBody AnimNode only. See coments on bEnableLinearProjection

  • enable_linear_projection (bool): [Read-Write] Enable Linear Projection: NOTE: RigidBody AnimNode only. Projection is not applied to ragdoll physics in the main scene. For Ragdolls, ShockPropagation has a similar effect and is more compatible with the world solver.

    Projection is a post-solve position and angular fixup where the parent body in the constraint is treated as having infinite mass and the child body is translated and rotated to resolve any remaining errors using a semi-physical correction. This can be used to make constraint chains significantly stiffer at lower iteration counts. Increasing iterations would have the same effect, but be much more expensive. Projection only works well if the chain is not interacting with other objects (e.g., through collisions) because the projection of the bodies in the chain will cause other constraints to be violated. Likewise, if a body is influenced by multiple constraints, then enabling projection on more than one constraint may lead to unexpected results - the “last” constraint would win but the order in which constraints are solved cannot be directly controlled.

    Projection is fairly expensive compared to a single position iteration, so if you can get the behaviour you need by adding a couple iterations, that is probably a better approach.

    Note: projection is only applied to hard-limit constraints, anf not applied to constraints with soft limits.

  • enable_shock_propagation (bool): [Read-Write] Enable Shock Propagation: Shock propagation increases the mass of the parent body for the last iteration of the position and velocity solve phases. This can help stiffen up joint chains, but is also prone to introducing energy down the chain especially at high alpha.

    NOTE: This is intended to be used for world constraints, not RigidBody AnimNodes which have the Projection system.

  • linear_break_threshold (float): [Read-Write] Linear Break Threshold: Force needed to break the distance constraint.

  • linear_breakable (bool): [Read-Write] Linear Breakable: Whether it is possible to break the joint with linear force.

  • linear_drive (LinearDriveConstraint): [Read-Write] Linear Drive

  • linear_limit (LinearConstraint): [Read-Write] Linear Limit

  • linear_plasticity (bool): [Read-Write] Linear Plasticity: Whether it is possible to reset spring rest length from the linear deformation.

  • linear_plasticity_threshold (float): [Read-Write] Linear Plasticity Threshold: [Chaos Only] Percent threshold from center of mass distance needed to reset the linear drive position target. This value can be greater than 1.

  • linear_plasticity_type (ConstraintPlasticityType): [Read-Write] Linear Plasticity Type: Whether linear plasticity has a operation mode [free]

  • parent_dominates (bool): [Read-Write] Parent Dominates: When set, the parent body in a constraint will not be affected by the motion of the child

  • projection_angular_alpha (float): [Read-Write] Projection Angular Alpha: How much angular projection to apply [0-1]

  • projection_linear_alpha (float): [Read-Write] Projection Linear Alpha: How much linear projection to apply [0-1]

  • shock_propagation_alpha (float): [Read-Write] Shock Propagation Alpha: How much shock propagation to apply [0-1]. Shock propagation increases the mass of the parent body for the last iteration of the position and velocity solve phases. This can help stiffen up joint chains, but is also prone to introducing energy down the chain especially at high alpha.

  • twist_limit (TwistConstraint): [Read-Write] Twist Limit