Mouse

Description

Mouse. Only can be called in client scripts.

Properties

        int    MousePosY
    Y-coordinate (vertical) of mouse pointer in current screen.

        int    MousePosX
    X-coordinate (horizontal) of mouse pointer in current screen.

        int    ViewPixelY
    Game window height (Pixel).

        int    ViewPixelX
    Game window width (Pixel).

        Ray    RayToMousePoint
    A line segment starts from the camera 3D global position and ends up in the mouse 3D global position.

        Surface    TargetSurfaceType
    Which surface of a basic part that the mouse is pointing to.

        RWObject    TargetFilterInstance
    Confirm the ignored object (and its descendants) of MouseHit and MouseTarget.

        RWObject    MouseTarget
    The object that the mouse is pointing to in 3D scene.

        Vector3    MouseDirection
    Direction of the camera pointing to the mouse.

        string    MouseIcon
    Mouse pointer image ID.

        Vector3    MouseHit
    Emit a ray from the camera, which is taken as the origin, to the mouse position. After the ray hits an object, returns the global position of the contact point.

Functions

    HideCursor()
    Hides the mouse pointer.

    ShowCursor()
    Displays the mouse pointer.

Events

    MouseMove()
    This event is triggered when the mouse moves.

    MouseButtonLeftDown()
    This event is triggered when the left mouse button is pressed.

    MouseButtonLeftUp()
    This event is triggered when the left mouse button is released.

    MouseLeftPress()
    This event is triggered when the left mouse button is clicked.

    MouseButtonRightDown()
    This event is triggered when the right mouse button is pressed.

    MouseButtonRightUp()
    This event is triggered when the right mouse button is released.

    MouseRightPress()
    This event is triggered when the right mouse button is clicked.

    MouseScroll()
    This event is triggered when the mouse wheel is scrolled.

    MouseWheelForward()
    This event is triggered when the mouse wheel is scrolled forwards.

    MouseWheelBackward()
    This event is triggered when the mouse wheel is scrolled backwards.

    MouseScrollDown()
    This event is triggered when the mouse wheel is pressed.

    MouseScrollUp()
    This event is triggered when the mouse wheel is released.

    MouseScrollPress()
    This event is triggered when the mouse wheel is clicked.

    MouseIdle()
    This event is triggered when the mouse stays stationary.