docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method TryGetThresholdTargetPosition

    TryGetThresholdTargetPosition(out Vector3)

    Determines if the new target position is within a dynamically determined threshold based on the time since the last update, and outputs the new target position if it meets the threshold.

    Declaration
    protected virtual bool TryGetThresholdTargetPosition(out Vector3 newTarget)
    Parameters
    Type Name Description
    Vector3 newTarget

    The output new target position as a Vector3, if within the allowed threshold.

    Returns
    Type Description
    bool

    Returns true if the squared distance between the current and new target positions is within the allowed threshold, false otherwise.

    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)