Struct RayCastResult | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct RayCastResult

    The RayCast(float3, float3, Entity) function returns this structure.

    Namespace: Unity.Tiny.HitBox2D
    Syntax
    public struct RayCastResult : IComponentData

    Fields

    entityHit

    Specifies the hit entity, or NONE if no entity is hit.

    Declaration
    public Entity entityHit
    Field Value
    Type Description
    Entity

    t

    Specifies a normalized [0..1] distance along a ray. The hit location is: hit = rayStart + (rayEnd-rayStart)*t; If the ray cast starts inside a hit box, t is the exit value.

    Declaration
    public float t
    Field Value
    Type Description
    System.Single
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023