source

Interact with the source engine.

Functions:

World To Screen

source.world_to_screen(vector: world_position, matrix_4x4: view_matrix)

Converts 3D world coordinates (either individual x, y, z or a vector) into 2D screen coordinates using the provided view matrix. Returns the resulting screen position as a vector.

Calculate Bounds

source.calculate_bounds(vector: world_position, vector: mins, vector: maxs, matrix_4x4: view_matrix)

Calculates a 3D object's bounding box into the 2D screen coordinates and returns the screen coordinates as a rectangle defined by its x, y, w, and h.

Last updated