⚠️ This site is under development, some artefacts may be missing or incomplete.
UI3D2D
Getting Started

Getting Started

Installation

Including UI3D2D in your project is a simple process, it can be downloaded from the GitHub releases page here (opens in a new tab). Once downloaded, the source files can be copied into your project and included using the include (opens in a new tab) method.

ℹ️

The UI3D2D extras are not required for the main library to function and can be removed from your project if not necessary.

Methods

UI3D2D includes the following methods which are accessible via the ui3d2d global table:

boolean ui3d2d.startDraw( Vector, Angle, number, Entity )

Starts a UI3D2D rendering context in immediate mode. Calling this will also determine the user's input status for the current frame.

ui3d2d.endDraw()

Ends the UI3D2D rendering context.

number, number ui3d2d.getCursorPos()

Returns the current position of the cursor. This will be nil when the player is not looking at the UI.

boolean ui3d2d.isHovering( number, number, number, number )

Determines whether or not the cursor is within the specified bounds.

boolean ui3d2d.isPressing()

Returns true when the player holds down the use or attack key.

boolean ui3d2d.isPressed()

Returns true if the player started pressing the UI on this frame.

boolean ui3d2d.drawVgui( Panel, Vector, Angle, number, Entity )

Draws the given VGUI panel in 3D space and allows the player to interact with it.