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] Torque needed to break the joint.

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

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

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

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

  • enable_projection (bool): [Read-Write] [PhysX] If distance error between bodies exceeds 0.1 units, or rotation error exceeds 10 degrees, body will be projected to fix this. For example a chain spinning too fast will have its elements appear detached due to velocity, this will project all bodies so they still appear attached to each other.

    [Chaos] Chaos applies 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. 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.

    Note: projection will not be applied to constraints with soft limits.

  • enable_soft_projection (bool): [Read-Write] [Chaos Only] Apply projection to constraints with soft limits. This can be used to stiffen up soft joints at low iteration counts, but the projection will override a lot of the spring-damper behaviour of the soft limits. E.g., if you have soft projection enabled and ProjectionAngularAlpha = 1.0, the joint will act as if it is a hard limit.

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

  • linear_breakable (bool): [Read-Write] 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

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

  • projection_angular_alpha (float): [Read-Write] [Chaos Only] How much angular projection to apply [0-1]. Projection fixes any post-solve angle error in the constraint.

  • projection_angular_tolerance (float): [Read-Write] [PhysX only] Angular tolerance value in world units. If the distance error exceeds this tolerence limit, the body will be projected.

  • projection_linear_alpha (float): [Read-Write] [Chaos Only] How much linear projection to apply [0-1]. Projection fixes any post-solve position error in the constraint.

  • projection_linear_tolerance (float): [Read-Write] [PhysX only] Linear tolerance value in world units. If the distance error exceeds this tolerence limit, the body will be projected.

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