docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Property alignPrefabWithSurfaceNormal

    alignPrefabWithSurfaceNormal

    Whether Unity aligns y-axis of the prefab to the ray casted surface normal. On non-horizontal surfaces this will use the xrOrigin.up to align the z-axis of the prefab. On horizontal surfaces this will use the interactor forward vector to align the z-axis of the prefab.

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

    If xrOrigin is null it will default to Vector3.up to align the z-axis of the prefab.

    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)