unreal.RaycastHitResult

class unreal.RaycastHitResult(hit_state=RaycastResultState.REQUEST_FAILED, hit_point=[0.0, 0.0, 0.0], normal=[0.0, 0.0, 0.0], confidence=0.0, user_data=0)

Bases: unreal.StructBase

Result of a raycast.

C++ Source:

  • Plugin: MagicLeap
  • Module: MagicLeap
  • File: RaycastComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • confidence (float): [Read-Write] Confidence of the raycast result.

    Confidence is a non-negative value from 0 to 1 where closer to 1 indicates a higher quality. It will be an indication of how much error there is in the averaging. For example, a flat plane will have a high confidence, while if the surface was very noisy the confidence would be very low. This field is only valid if the state is either HitUnobserved or HitObserved.

  • hit_point (Vector): [Read-Write] Where in the world the collision happened. This field is only valid if the state

    is either HitUnobserved or HitObserved.

  • hit_state (RaycastResultState): [Read-Write] The raycast result. If this field is either RequestFailed or NoCollision,

    most of the fields in this structure are invalid.

  • normal (Vector): [Read-Write] Normal to the surface where the ray collided. This field is only valid if the state

    is either HitUnobserved or HitObserved

  • user_data (int32): [Read-Write] The data set in the RaycastQueryParams. This can be used for query identification.

confidence

(float) – [Read-Only] Confidence of the raycast result.

Confidence is a non-negative value from 0 to 1 where closer to 1 indicates a higher quality. It will be an indication of how much error there is in the averaging. For example, a flat plane will have a high confidence, while if the surface was very noisy the confidence would be very low. This field is only valid if the state is either HitUnobserved or HitObserved.

hit_point

(Vector) – [Read-Only] Where in the world the collision happened. This field is only valid if the state is either HitUnobserved or HitObserved.

hit_state

(RaycastResultState) – [Read-Only] The raycast result. If this field is either RequestFailed or NoCollision, most of the fields in this structure are invalid.

normal

(Vector) – [Read-Only] Normal to the surface where the ray collided. This field is only valid if the state is either HitUnobserved or HitObserved

user_data

(int32) – [Read-Only] The data set in the RaycastQueryParams. This can be used for query identification.