{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method FindClosestPoint | Cinemachine | 2.6.0
docs.unity3d.com
"{0}" の検索結果

    目次を表示する/隠す

    Method FindClosestPoint

    FindClosestPoint(Vector3, int, int, int)

    Find the closest point on the path to a given worldspace target point.

    Declaration
    public virtual float FindClosestPoint(Vector3 p, int startSegment, int searchRadius, int stepsPerSegment)
    Parameters
    Type Name Description
    Vector3 p

    Worldspace target that we want to approach

    int startSegment

    In what segment of the path to start the search. A Segment is a section of path between 2 waypoints.

    int searchRadius

    How many segments on either side of the startSegment to search. -1 means no limit, i.e. search the entire path

    int stepsPerSegment

    We search a segment by dividing it into this many straight pieces. The higher the number, the more accurate the result, but performance is proportionally slower for higher numbers

    Returns
    Type Description
    float

    The position along the path that is closest to the target point. The value is in Path Units, not Distance units.

    Remarks

    Performance could be improved by checking the bounding polygon of each segment, and only entering the best segment(s)

    概要
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)