From e7301abd114ff2b4090e8558eb40ab9145e57411 Mon Sep 17 00:00:00 2001 From: blockninja124 <64211894+blockninja124@users.noreply.github.com> Date: Wed, 7 Aug 2024 17:34:50 +0100 Subject: [PATCH] Update Vectors.md Added more info on the Vector4 returned from worldToScreenSpace --- docs/globals/Vectors/Vectors.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/globals/Vectors/Vectors.md b/docs/globals/Vectors/Vectors.md index f24da5b9..855a8bd3 100644 --- a/docs/globals/Vectors/Vectors.md +++ b/docs/globals/Vectors/Vectors.md @@ -716,6 +716,12 @@ vectors.toCameraSpace(vec(1, 2, 3)) Converts a position in the world into a position relative to the viewer's screen +The first and second elements of the returned Vector4 are the x and y positions where `-1 .. 1` is +the range between the edges of the screen. +The third element is `>1.0` when looking at the world position and `<1.0` when +looking away. +The fourth element is the distance of the screen from the world position. +