diff options
| author | raysan5 <[email protected]> | 2016-10-10 19:43:27 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2016-10-10 19:43:27 +0200 |
| commit | 648676f46b01327f0fbd6f017292a3159ea9ab2f (patch) | |
| tree | 0abbf24e6c394472cad3290ef10f3b8d5bf8f87a /examples/models_heightmap.c | |
| parent | 5fecf5c088122dc409bd209b08627e671cbdc175 (diff) | |
| download | raylib-648676f46b01327f0fbd6f017292a3159ea9ab2f.tar.gz raylib-648676f46b01327f0fbd6f017292a3159ea9ab2f.zip | |
Update examples to new camera system
Diffstat (limited to 'examples/models_heightmap.c')
| -rw-r--r-- | examples/models_heightmap.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/models_heightmap.c b/examples/models_heightmap.c index 90e5f5bb..10069e03 100644 --- a/examples/models_heightmap.c +++ b/examples/models_heightmap.c @@ -29,20 +29,19 @@ int main() map.material.texDiffuse = texture; // Set map diffuse texture Vector3 mapPosition = { -8.0f, 0.0f, -8.0f }; // Set model position (depends on model scaling!) - UnloadImage(image); // Unload heightmap image from RAM, already uploaded to VRAM + UnloadImage(image); // Unload heightmap image from RAM, already uploaded to VRAM - SetCameraMode(CAMERA_ORBITAL); // Set an orbital camera mode - SetCameraPosition(camera.position); // Set internal camera position to match our custom camera position + SetCameraMode(camera, CAMERA_ORBITAL); // Set an orbital camera mode - SetTargetFPS(60); // Set our game to run at 60 frames-per-second + SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- // Main game loop - while (!WindowShouldClose()) // Detect window close button or ESC key + while (!WindowShouldClose()) // Detect window close button or ESC key { // Update //---------------------------------------------------------------------------------- - UpdateCamera(&camera); // Update internal camera and our camera + UpdateCamera(&camera); // Update camera //---------------------------------------------------------------------------------- // Draw |
