docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Property improveAccuracyWithSphereCollider

    improveAccuracyWithSphereCollider

    When a Sphere Collider component is the only collider on this interactor, and no Rigidbody component is attached, the interactor will use Burst compiler optimizations and sphere casts instead of relying on physics trigger events to evaluate direct interactions when this property is enabled. This also improves inter-frame accuracy and reliability.

    Declaration
    public bool improveAccuracyWithSphereCollider { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    Cannot change this value at runtime after Awake. Enabling this property can improve inter-frame reliability during fast motion when the requirements for optimization are met by running on each Update instead of Fixed Update and using a sphere cast to determine valid targets. Disable to force the use of trigger events, such as the OnTriggerStay and FixedUpdate methods.

    See Also
    usingSphereColliderAccuracyImprovement
    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)