Screen-space related functions for 3DCamera.

This commit is contained in:
jussi
2022-03-31 13:55:02 +03:00
parent a3c28c0001
commit 30d425aa26
7 changed files with 164 additions and 9 deletions

33
API.md
View File

@@ -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
---