From 024e48850e82ff466d1712227bcddbb8a5b627bb Mon Sep 17 00:00:00 2001 From: raysan5 Date: Wed, 17 Jun 2015 19:56:52 +0200 Subject: [PATCH] Corrected camera issue and added function --- src/camera.c | 31 +++++-------------------------- src/raylib.h | 1 + 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/src/camera.c b/src/camera.c index b016308e..cb99ba6b 100644 --- a/src/camera.c +++ b/src/camera.c @@ -162,7 +162,7 @@ static void ProcessCamera(Camera *camera, Vector3 *playerPosition) { #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB) || defined(PLATFORM_RPI) // Mouse movement detection - if (cameraMode != CAMERA_FREE) + if ((cameraMode != CAMERA_FREE) && (cameraMode != CAMERA_ORBITAL)) { HideCursor(); @@ -449,28 +449,7 @@ void SetSmoothZoomControl(int smoothZoomControlKey) smoothZoomControllingKey = smoothZoomControlKey; } - - - - - - - - - - - - - - - - - - - - - - - - - +void SetOrbitalTarget(Vector3 target) +{ + internalCamera.target = target; +} diff --git a/src/raylib.h b/src/raylib.h index 0d16a9af..6800b260 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -437,6 +437,7 @@ void SetResetControl(int resetKey); void SetPawnControl(int pawnControlKey); void SetFnControl(int fnControlKey); void SetSmoothZoomControl(int smoothZoomControlKey); +void SetOrbitalTarget(Vector3 target); int GetShaderLocation(Shader shader, const char *uniformName); void SetShaderValue(Shader shader, int uniformLoc, float *value, int size);