unreal.PhysicsConstraintInfo

class unreal.PhysicsConstraintInfo(bone1_name: str = '', bone2_name: str = '', swing1_motion: ConstraintMotion = Ellipsis, swing1_limit_degrees: float = 0.0, swing2_motion: ConstraintMotion = Ellipsis, swing2_limit_degrees: float = 0.0, twist_motion: ConstraintMotion = Ellipsis, twist_limit_degrees: float = 0.0)

Bases: StructBase

Describes the angular limits for a single constraint between two bodies. Bone1 is the child bone; Bone2 is the parent bone. All limit angles are in degrees [0, 180].

C++ Source:

  • Plugin: PhysicsToolsets

  • Module: PhysicsToolsets

  • File: PhysicsAssetToolset.h

Editor Properties: (see get_editor_property/set_editor_property)

  • bone1_name (str): [Read-Write] Name of the child bone.

  • bone2_name (str): [Read-Write] Name of the parent bone.

  • swing1_limit_degrees (float): [Read-Write] Swing 1 limit in degrees. Used when Swing1Motion is Limited.

  • swing1_motion (ConstraintMotion): [Read-Write] Motion type for Swing 1 (rotation around the body-local Y axis).

  • swing2_limit_degrees (float): [Read-Write] Swing 2 limit in degrees. Used when Swing2Motion is Limited.

  • swing2_motion (ConstraintMotion): [Read-Write] Motion type for Swing 2 (rotation around the body-local Z axis).

  • twist_limit_degrees (float): [Read-Write] Twist limit in degrees. Used when TwistMotion is Limited.

  • twist_motion (ConstraintMotion): [Read-Write] Motion type for Twist (rotation around the body-local X axis).

property bone1_name: str

[Read-Write] Name of the child bone.

Type:

(str)

property bone2_name: str

[Read-Write] Name of the parent bone.

Type:

(str)

property swing1_limit_degrees: float

[Read-Write] Swing 1 limit in degrees. Used when Swing1Motion is Limited.

Type:

(float)

property swing1_motion: ConstraintMotion

[Read-Write] Motion type for Swing 1 (rotation around the body-local Y axis).

Type:

(ConstraintMotion)

property swing2_limit_degrees: float

[Read-Write] Swing 2 limit in degrees. Used when Swing2Motion is Limited.

Type:

(float)

property swing2_motion: ConstraintMotion

[Read-Write] Motion type for Swing 2 (rotation around the body-local Z axis).

Type:

(ConstraintMotion)

property twist_limit_degrees: float

[Read-Write] Twist limit in degrees. Used when TwistMotion is Limited.

Type:

(float)

property twist_motion: ConstraintMotion

[Read-Write] Motion type for Twist (rotation around the body-local X axis).

Type:

(ConstraintMotion)