util.PixelVisible
Description
Returns the visibility of a square that is always pointed at the camera in the world-space.
This is typically used for in-game sprites or "billboards". (render.DrawSprite)
Arguments
3 pixelvis_handle_t PixVis
The PixVis handle created with util.GetPixelVisibleHandle.
Don't use the same handle twice per tick or it will give unpredictable results.
Returns
1 number
Visibility percentage, in range of
[0-1]. 0 when none of the area is visible, 0.5 when half the area is visible, 1 when all of it is visible, etc.Example
Demonstrates approximately what this function does.
Output:
Garry's Mod
Rust
Steamworks
Wiki Help