BBMOD_BaseCamera.world_to_screen

A function defined in BBMOD_BaseCamera.gml

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

Description

Computes screen-space position of a point in world-space.

Arguments

Name Type Description
_position Struct.BBMOD_Vec3 The world-space position.
_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 January 21, 2024 using GMDoc.