BBMOD_BaseCamera.world_to_screen

A function defined in BBMOD_BaseCamera.gml

world_to_screen(_vector[, _screenWidth[, _screenHeight]])

Description

Computes screen-space position from a vector in world-space.

Arguments

Name Type Description
_vector Struct.BBMOD_Vec3, Struct.BBMOD_Vec4 The vector in world-space.
_screenWidth Real The width of the screen. If undefined, it is retrieved using window_get_width.
_screenHeight Real The height of the screen. If undefined, it is retrieved using window_get_height.

Returns

Struct.BBMOD_Vec4 The screen-space position or undefined if the point is outside of the screen.

Note

This requires BBMOD_BaseCamera.ViewProjectionMatrix, so you should use this after BBMOD_BaseCamera.update_matrices (or BBMOD_BaseCamera.update) is called!

Do you find this page helpful?

Copyright © 2024, BlueBurn. Built on April 26, 2024 using GMDoc.