diff options
| author | Ray San <[email protected]> | 2018-04-11 10:13:00 +0200 |
|---|---|---|
| committer | Ray San <[email protected]> | 2018-04-11 10:13:00 +0200 |
| commit | 4cc12ef2b32f66f160e4e401e5cd76d1740eaf61 (patch) | |
| tree | f9a43a0d3e69aa430e3a8152bb6b5b9268c3b1be /examples/models/models_billboard.c | |
| parent | cc3b8645df23ed9aeb9d6efc806ab91170a29a89 (diff) | |
| download | raylib-4cc12ef2b32f66f160e4e401e5cd76d1740eaf61.tar.gz raylib-4cc12ef2b32f66f160e4e401e5cd76d1740eaf61.zip | |
Review camera definition on examples
Diffstat (limited to 'examples/models/models_billboard.c')
| -rw-r--r-- | examples/models/models_billboard.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/models/models_billboard.c b/examples/models/models_billboard.c index bca9faf8..3b3efc47 100644 --- a/examples/models/models_billboard.c +++ b/examples/models/models_billboard.c @@ -21,7 +21,13 @@ int main() InitWindow(screenWidth, screenHeight, "raylib [models] example - drawing billboards"); // Define the camera to look into our 3d world - Camera camera = {{ 5.0f, 4.0f, 5.0f }, { 0.0f, 2.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f }; + Camera camera = { 0 }; + camera.position = (Vector3){ 5.0f, 4.0f, 5.0f }; + camera.target = (Vector3){ 0.0f, 2.0f, 0.0f }; + camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; + camera.fovy = 45.0f; + camera.type = CAMERA_PERSPECTIVE; + Texture2D bill = LoadTexture("resources/billboard.png"); // Our texture billboard Vector3 billPosition = { 0.0f, 2.0f, 0.0f }; // Position where draw billboard |
