unreal.PhysicsShapeInfo

class unreal.PhysicsShapeInfo(shape_name: str = '', shape_type: PhysicsShapeType = Ellipsis, center: Vector = Ellipsis, rotation: Rotator = Ellipsis, radius: float = 0.0, length: float = 0.0, extent_x: float = 0.0, extent_y: float = 0.0, extent_z: float = 0.0)

Bases: StructBase

Describes a single collision primitive on a physics body. All positions and rotations are in the bone’s local space.

C++ Source:

  • Plugin: PhysicsToolsets

  • Module: PhysicsToolsets

  • File: PhysicsAssetToolset.h

Editor Properties: (see get_editor_property/set_editor_property)

  • center (Vector): [Read-Write] Center position in bone-local space (cm).

  • extent_x (float): [Read-Write] Full extent along local X (cm). Used by Box only.

  • extent_y (float): [Read-Write] Full extent along local Y (cm). Used by Box only.

  • extent_z (float): [Read-Write] Full extent along local Z (cm). Used by Box only.

  • length (float): [Read-Write] Cylinder section length (cm). Used by Capsule only. Total capsule height = Length + 2 * Radius.

  • radius (float): [Read-Write] Radius (cm). Used by Sphere and Capsule.

  • rotation (Rotator): [Read-Write] Orientation in bone-local space. For Capsule, Z is the long axis. Unused for Sphere.

  • shape_name (str): [Read-Write] User-defined name that uniquely identifies this shape on the body.

  • shape_type (PhysicsShapeType): [Read-Write] The type of collision primitive.

property center: Vector

[Read-Write] Center position in bone-local space (cm).

Type:

(Vector)

property extent_x: float

[Read-Write] Full extent along local X (cm). Used by Box only.

Type:

(float)

property extent_y: float

[Read-Write] Full extent along local Y (cm). Used by Box only.

Type:

(float)

property extent_z: float

[Read-Write] Full extent along local Z (cm). Used by Box only.

Type:

(float)

property length: float

[Read-Write] Cylinder section length (cm). Used by Capsule only. Total capsule height = Length + 2 * Radius.

Type:

(float)

property radius: float

[Read-Write] Radius (cm). Used by Sphere and Capsule.

Type:

(float)

property rotation: Rotator

[Read-Write] Orientation in bone-local space. For Capsule, Z is the long axis. Unused for Sphere.

Type:

(Rotator)

property shape_name: str

[Read-Write] User-defined name that uniquely identifies this shape on the body.

Type:

(str)

property shape_type: PhysicsShapeType

[Read-Write] The type of collision primitive.

Type:

(PhysicsShapeType)