Search Results for

    Show / Hide Table of Contents

    Class RayCastHit

    Raycast hit result data.

    Inheritance
    System.Object
    RayCastHit
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public sealed class RayCastHit : ValueType

    Fields

    Collider

    The collider that was hit.

    Declaration
    public PhysicsColliderActor Collider
    Field Value
    PhysicsColliderActor

    Distance

    The distance from the ray's origin to the hit location.

    Declaration
    public float Distance
    Field Value
    System.Single

    FaceIndex

    The index of the face that was hit. Valid only for convex mesh (polygon index), triangle mesh (triangle index) and height field (triangle index).

    Declaration
    public uint FaceIndex
    Field Value
    System.UInt32

    See Also
    GetModelTriangle(UInt32, out MeshBase, out UInt32)

    Material

    The physical material of the surface that was hit.

    Declaration
    public PhysicalMaterial Material
    Field Value
    PhysicalMaterial

    Normal

    The normal of the surface the ray hit.

    Declaration
    public Vector3 Normal
    Field Value
    Vector3

    Point

    The point in the world space where ray hit the collider.

    Declaration
    public Vector3 Point
    Field Value
    Vector3

    UV

    The barycentric coordinates of hit triangle. Valid only for triangle mesh and height field.

    Declaration
    public Float2 UV
    Field Value
    Float2

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat