Added camera orbit controls.

This commit is contained in:
2021-08-24 22:04:01 -07:00
parent 6981a4b3d7
commit ba625505a4
9 changed files with 61 additions and 23 deletions

View File

@ -65,4 +65,20 @@ void cameraPerspective(camera_t *camera,
*/
void cameraOrtho(camera_t *camera,
float left, float right, float bottom, float top, float camNear, float camFar
);
/**
* Update a camera to orbit around a point.
*
* @param camera Camera to update
* @param distance Distance from the point
* @param yaw Yaw (Y axis) rotation.
* @param pitch Pitch (X/Z axis) rotation.
* @param targetX X point to orbit around.
* @param targetY Y point to orbit around.
* @param targetZ Z point to orbit around.
*/
void cameraOrbit(camera_t *camera,
float distance, float yaw, float pitch,
float targetX, float targetY, float targetZ
);