docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ManipulatorSnap

    ManipulatorSnap(IUsesSnapping, Transform, Transform[], ref Vector3, ref Quaternion, Vector3, AxisFlags, PivotMode)

    Perform manipulator snapping: Translate a position vector using deltas while also respecting snapping

    Declaration
    public static bool ManipulatorSnap(this IUsesSnapping user, Transform rayOrigin, Transform[] transforms, ref Vector3 position, ref Quaternion rotation, Vector3 delta, AxisFlags constraints, PivotMode pivotMode)
    Parameters
    Type Name Description
    IUsesSnapping user

    The functionality user

    Transform rayOrigin

    The ray doing the translating

    Transform[] transforms

    The transforms being translated (used to determine bounds; Transforms do not get modified)

    Vector3 position

    The position being modified by delta. This will be set with a snapped position if possible

    Quaternion rotation

    The rotation to be modified if rotation snapping is enabled

    Vector3 delta

    The position delta to apply

    AxisFlags constraints

    The axis constraints

    PivotMode pivotMode

    The current pivot mode

    Returns
    Type Description
    bool

    Whether the position was set to a snapped position

    In This Article
    Back to top
    Copyright © 2024 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)