docs.unity3d.com
    Show / Hide Table of Contents

    Enum InputSystemUIInputModule.CursorLockBehavior

    Controls the origin point of raycasts when the cursor is locked.

    Namespace: UnityEngine.InputSystem.UI
    Syntax
    public enum CursorLockBehavior

    Fields

    Name Description Value
    OutsideScreen

    The internal pointer position will be set to -1, -1. This short-circuits the raycasting logic so no objects will be intersected. This is the default setting.

    ScreenCenter

    Raycasts will originate from the center of the screen. This mode can be useful for example to check in pointer-driven FPS games if the player is looking at some world-space object that implements the UnityEngine.EventSystems.IPointerEnterHandler and UnityEngine.EventSystems.IPointerExitHandler interfaces.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023