docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method StartSocketSnapping

    StartSocketSnapping(XRGrabInteractable)

    Initiates socket snapping for a specified XRGrabInteractable object.

    Declaration
    protected virtual bool StartSocketSnapping(XRGrabInteractable grabInteractable)
    Parameters
    Type Name Description
    XRGrabInteractable grabInteractable

    The XRGrabInteractable object to initiate socket snapping for.

    Returns
    Type Description
    bool

    Returns true if the operation is successful; false if the socket snapping has already started for the interactable or if the number of interactables with socket transformer exceeds the socket limit.

    Remarks

    If the socket snapping has already started for the interactable, or if the number of interactables with socket transformer exceeds the socket limit, the method does nothing. Otherwise, it adds the specified grab interactable to the socket grab transformer and adds it to the global and local interactables with socket transformer lists.

    See Also
    EndSocketSnapping(XRGrabInteractable)
    In This Article
    Back to top
    Copyright © 2023 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)