unreal.RigUnit_SphereTraceByObjectTypes

class unreal.RigUnit_SphereTraceByObjectTypes(start: Vector = Ellipsis, end: Vector = Ellipsis, object_types: Array[ObjectTypeQuery] = [], radius: float = 0.0, hit: bool = False, hit_location: Vector = Ellipsis, hit_normal: Vector = Ellipsis)

Bases: RigUnit

Sweeps a sphere against the world and return the first blocking hit. The trace is filtered by object types only, the collision response settings are ignored. You can create custom object types in Project Setting - Collision

C++ Source:

  • Plugin: ControlRig

  • Module: ControlRig

  • File: RigUnit_WorldCollision.h

Editor Properties: (see get_editor_property/set_editor_property)

  • end (Vector): [Read-Write] End: End of the trace in rig / global space

  • hit (bool): [Read-Write] Hit: Returns true if there was a hit

  • hit_location (Vector): [Read-Write] Hit Location: Hit location in rig / global Space

  • hit_normal (Vector): [Read-Write] Hit Normal: Hit normal in rig / global Space

  • object_types (Array[ObjectTypeQuery]): [Read-Write] Object Types: The types of objects that this trace can hit

  • radius (float): [Read-Write] Radius: Radius of the sphere to use for sweeping / tracing

  • start (Vector): [Read-Write] Start: Start of the trace in rig / global space

property end: Vector

[Read-Write] End: End of the trace in rig / global space

Type:

(Vector)

property hit: bool

[Read-Only] Hit: Returns true if there was a hit

Type:

(bool)

property hit_location: Vector

[Read-Only] Hit Location: Hit location in rig / global Space

Type:

(Vector)

property hit_normal: Vector

[Read-Only] Hit Normal: Hit normal in rig / global Space

Type:

(Vector)

property object_types: Array[ObjectTypeQuery]

[Read-Write] Object Types: The types of objects that this trace can hit

Type:

(Array[ObjectTypeQuery])

property radius: float

[Read-Write] Radius: Radius of the sphere to use for sweeping / tracing

Type:

(float)

property start: Vector

[Read-Write] Start: Start of the trace in rig / global space

Type:

(Vector)