REVIEWED: models_yaw_pitch_roll

This commit is contained in:
raysan5 2021-10-19 14:58:04 +02:00
parent fec0ce34c5
commit 2e151408bb
10 changed files with 10939 additions and 443 deletions

View file

@ -32,9 +32,9 @@ int main(void)
camera.fovy = 30.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera type
// Model loading
// NOTE: Diffuse map loaded automatically
Model model = LoadModel("resources/models/gltf/plane/plane.gltf");
Model model = LoadModel("resources/models/obj/plane.obj"); // Load model
Texture2D texture = LoadTexture("resources/models/obj/plane_diffuse.png"); // Load model texture
model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set map diffuse texture
float pitch = 0.0f;
float roll = 0.0f;
@ -88,7 +88,7 @@ int main(void)
// Draw 3D model (recomended to draw 3D always before 2D)
BeginMode3D(camera);
DrawModel(model, (Vector3){ 0.0f, 0.0f, 15.0f }, 0.25f, WHITE); // Draw 3d model with texture
DrawModel(model, (Vector3){ 0.0f, -8.0f, 0.0f }, 1.0f, WHITE); // Draw 3d model with texture
DrawGrid(10, 10.0f);
EndMode3D();