From 30d425aa26a3aa802cb2ff55f1f7655be056f3ed Mon Sep 17 00:00:00 2001 From: jussi Date: Thu, 31 Mar 2022 13:55:02 +0300 Subject: Screen-space related functions for 3DCamera. --- API.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'API.md') diff --git a/API.md b/API.md index 2664d48..633c92c 100644 --- a/API.md +++ b/API.md @@ -667,7 +667,7 @@ int id. Basic 3d Model type --- -> RayCollision = { hit = true, distance = 1.0, point = { 0.0, 0.0 }, normal = { 0.0, 0.0, 1.0 } } +> RayCollision = { hit = true, distance = 1.0, point = { 0.0, 0.0, 0.0 }, normal = { 0.0, 0.0, 1.0 } } Raycast hit information. NOTE: Data in named keys @@ -1721,6 +1721,37 @@ Update camera position for selected mode --- +## Core - Screen-space + +--- + +> ray = RL_GetMouseRay( Vector2 mousePosition, Camera3D camera ) + +Get a ray trace from mouse position + +- Failure return false +- Success return Ray + +--- + +> matrix = RL_GetCameraMatrix( Camera3D camera ) + +Get camera transform matrix ( view matrix ) + +- Failure return false +- Success return Matrix + +--- + +> position = RL_GetWorldToScreen( Vector3 position, Camera3D camera ) + +Get the screen space position for a 3d world space position + +- Failure return false +- Success return Vector2 + +--- + ## Shapes - Drawing --- -- cgit v1.2.3