docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ColliderCastInput

    The input to collider cast queries consists of a Collider and its initial orientation, and the Start & End positions of a line segment the Collider is to be swept along.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Physics
    Assembly: Unity.Physics.dll
    Syntax
    public struct ColliderCastInput

    Constructors

    ColliderCastInput(BlobAssetReference<Collider>, float3, float3)

    Constructor.

    Declaration
    public ColliderCastInput(BlobAssetReference<Collider> collider, float3 start, float3 end)
    Parameters
    Type Name Description
    BlobAssetReference<Collider> collider

    The collider to cast with.

    float3 start

    The starting point.

    float3 end

    The ending point.

    ColliderCastInput(BlobAssetReference<Collider>, float3, float3, quaternion, float)

    Constructor.

    Declaration
    public ColliderCastInput(BlobAssetReference<Collider> collider, float3 start, float3 end, quaternion orientation, float queryColliderScale = 1)
    Parameters
    Type Name Description
    BlobAssetReference<Collider> collider

    The collider to cast with.

    float3 start

    The starting point.

    float3 end

    The ending point.

    quaternion orientation

    The orientation of the collider.

    float queryColliderScale

    (Optional) The collider scale.

    Fields

    Collider

    Gets or sets the collider used to cast with.

    Declaration
    [NativeDisableUnsafePtrRestriction]
    public Collider* Collider
    Field Value
    Type Description
    Collider*

    The collider to cast with.

    Properties

    End

    Gets or sets the ending point of a cast.

    Declaration
    public float3 End { get; set; }
    Property Value
    Type Description
    float3

    The ending point.

    Orientation

    Gets or sets the orientation of the collider used to cast with.

    Declaration
    public quaternion Orientation { readonly get; set; }
    Property Value
    Type Description
    quaternion

    The orientation.

    QueryColliderScale

    Gets or sets the query collider scale.

    Declaration
    public float QueryColliderScale { readonly get; set; }
    Property Value
    Type Description
    float

    The query collider scale.

    Start

    Gets or sets the starting point of a cast.

    Declaration
    public float3 Start { get; set; }
    Property Value
    Type Description
    float3

    The starting point.

    Methods

    ToString()

    Convert this object into a string representation.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents this object.

    Overrides
    ValueType.ToString()

    Extension Methods

    BlobAssetReferenceColliderExtension.SetCollider(ref ColliderCastInput, BlobAssetReference<Collider>)
    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)