docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IQueryResult

    Interface for query results.

    Namespace: Unity.Physics
    Assembly: Unity.Physics.dll
    Syntax
    public interface IQueryResult

    Properties

    ColliderKey

    ColliderKey of the hit leaf collider.

    Declaration
    ColliderKey ColliderKey { get; }
    Property Value
    Type Description
    ColliderKey

    The collider key.

    Entity

    Entity of the hit body.

    Declaration
    Entity Entity { get; }
    Property Value
    Type Description
    Entity

    The entity.

    Fraction

    For casts this is fraction of the query at which the hit occurred. For distance queries, this is a distance from the query object.

    Declaration
    float Fraction { get; }
    Property Value
    Type Description
    float

    The fraction.

    Material

    Material of the hit leaf collider.

    Declaration
    Material Material { get; }
    Property Value
    Type Description
    Material

    The material.

    RigidBodyIndex

    Index of the hit body in the CollisionWorld's rigid body array.

    Declaration
    int RigidBodyIndex { get; }
    Property Value
    Type Description
    int

    The rigid body index.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)