Show / Hide Table of Contents

    Struct RaycastHit

    Structure used to get information back from a raycast.

    Namespace: Motphys.Rigidbody
    Assembly: solution.dll
    Syntax
    public struct RaycastHit

    Fields

    collider

    Declaration
    public BaseCollider collider
    Field Value
    Type Description
    BaseCollider

    The collider that was hit.

    distance

    Declaration
    public float distance
    Field Value
    Type Description
    System.Single

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

    normal

    Declaration
    public Vector3 normal
    Field Value
    Type Description
    Vector3

    The normal of the surface the raycast hit.

    point

    Declaration
    public Vector3 point
    Field Value
    Type Description
    Vector3

    The position of the surface the raycast hit.

    rigidbody

    Declaration
    public Rigidbody3D rigidbody
    Field Value
    Type Description
    Rigidbody3D

    The rigidbody of the collider that was hit. If the collider is not bound to a rigidbody, this value is null.

    Back to top Copyright © 2020-2024 北京谋先飞技术有限公司及其关联公司北京谋先飞科技有限公司
    Generated by DocFX