RSX Code Reference
    Preparing search index...
    • rsx
    • PhysicsQueryHit

    Class PhysicsQueryHit

    Hit information from a physics query.

    Index
    _colliderHandle: Collider
    _colliderShape: ColliderShape
    _dataUV: Vector2
    _distance: number
    _isHit: boolean
    _normal: Vector3
    _point: Vector3
    _triangleIndex: number
    • get colliderHandle(): Collider

      Component of the collider that was hit. This may be null if the hit collider has no owner component, in which case refer to ColliderShape.

      Returns Collider

    • get dataUV(): Vector2

      Barycentric coordinates of the triangle that was hit (only applicable when triangle meshes are hit).

      Returns Vector2

    • get distance(): number

      Distance from the query origin to the hit position.

      Returns number

    • get isHit(): boolean

      If false, this is not a valid hit. Fields will contain default values

      Returns boolean

    • get normal(): Vector3

      Normal to the surface that was hit.

      Returns Vector3

    • get point(): Vector3

      Position of the hit in world space.

      Returns Vector3

    • get triangleIndex(): number

      Index of the triangle that was hit (only applicable when triangle meshes are hit). It represents an index into the original MeshData used to Create the PhysicsMesh associated with collider.

      Returns number