docs.unity3d.com
    Show / Hide Table of Contents

    Interface IQueryResult

    Interface for query results.

    Namespace: Unity.Physics
    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
    Single

    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
    Int32

    The rigid body index.

    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