source
Interact with the source engine.
When using the functions prefixed with read from the info is returned directly from memory. It's strongly advised that these functions are never called within the paint callback. Calling these functions within the paint callback, may cause unexpected performance drops. Querying the game's memory is expensive, and doing it every frame is not optimal.
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