Show / Hide Table of Contents

    Struct Collision

    Collision information. This struct is passed to the collision event handlers.

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

    Properties

    collider

    Declaration
    public BaseCollider collider { get; }
    Property Value
    Type Description
    BaseCollider

    The collider that was hit. NOTE: this might be null if the rigidbody is not attached to a collider.

    contactCount

    Declaration
    public int contactCount { get; }
    Property Value
    Type Description
    System.Int32

    The contact number

    gameObject

    Declaration
    public GameObject gameObject { get; }
    Property Value
    Type Description
    GameObject

    The gameObject that was hit.

    rigidbody

    Declaration
    public Rigidbody3D rigidbody { get; }
    Property Value
    Type Description
    Rigidbody3D

    The rigidbody that was hit. NOTE: this might be null if the collider is not attached to a rigidbody.

    transform

    Declaration
    public Transform transform { get; }
    Property Value
    Type Description
    Transform

    The transform of the gameObject that was hit.

    Methods

    GetContact(Int32)

    Get Contact in ContactManifold by index

    Declaration
    public ContactPoint GetContact(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    ContactPoint
    Back to top Copyright © 2020-2024 北京谋先飞技术有限公司及其关联公司北京谋先飞科技有限公司
    Generated by DocFX