docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Property raycastSnapVolumeInteraction

    raycastSnapVolumeInteraction

    Whether ray cast should include or ignore hits on trigger colliders that are snap volume colliders, even if the ray cast is set to ignore triggers. If you are not using gaze assistance or XR Interactable Snap Volume components, you should set this property to Ignore to avoid the performance cost.

    Declaration
    public XRRayInteractor.QuerySnapVolumeInteraction raycastSnapVolumeInteraction { get; set; }
    Property Value
    Type Description
    XRRayInteractor.QuerySnapVolumeInteraction
    Remarks

    When set to Collide when raycastTriggerInteraction is set to ignore trigger colliders (when set to Ignore or when set to UseGlobal while queriesHitTriggers is false), the ray cast query will be modified to include trigger colliders, but then this behavior will ignore any trigger collider hits that are not snap volumes.
    When set to Ignore when raycastTriggerInteraction is set to hit trigger colliders (when set to Collide or when set to UseGlobal while queriesHitTriggers is true), this behavior will ignore any trigger collider hits that are snap volumes.

    See Also
    raycastTriggerInteraction
    snapCollider
    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)