Skip to main content

coordinates

Convert between screen-space (viewport) and 3D world-space positions. This is essential for placing effects, positioning webviews relative to characters, and mapping mouse/touch input to world locations.

Import

import { coordinates } from "@hmcs/sdk";

Functions

FunctionDescription
toWorldConvert screen-pixel coordinates to 2D world-space coordinates
toViewportProject a 3D world position onto screen coordinates

See also: Type Definitions