zwiększenie tarcia, zmniejszenie reflektywności obiektów

This commit is contained in:
2025-01-19 11:07:35 +01:00
parent e9fba90fa2
commit b805164ad4

View File

@@ -121,7 +121,7 @@ float velocity = 0.0f; // Aktualna prędkość łazika
float rotationVelocity = 0.0f; // Prędkość obrotu łazika
const float friction = 0.01f; // Współczynnik tarcia (μ)
const float friction = 0.1f; // Współczynnik tarcia (μ)
const float maxSpeed = 5.0f; // Maksymalna prędkość łazika
const float acceleration = 0.2f;
@@ -859,7 +859,8 @@ static void SetupRC() {
// All materials hereafter have full specular reflectivity
// with a high shine
glMaterialfv(GL_FRONT, GL_SPECULAR, specref);
GLfloat specref2[] = {0.2f, 0.2f, 0.2f, 0.2f};
glMaterialfv(GL_FRONT, GL_SPECULAR, specref2);
glMateriali(GL_FRONT, GL_SHININESS, 128);
// White background
@@ -929,6 +930,7 @@ void static RenderScene(void) {
// Rysowanie mapy
glPushMatrix();
glColor3f(0.0, 1.0, 0.0); // Zielony kolor
mapa.draw();
platforma(50.0f, 0.0f, 45.0f, 600.0f, 650.0f);
glPopMatrix();
@@ -944,8 +946,8 @@ void static RenderScene(void) {
glPopMatrix();
// Rysowanie innych obiektów
plot(-550.0f, 3.0f, 50.0f, 1310.0f, 4.0f, 0);
plot(50.0f, 3.0f, -600.0f, 1200.0f, 4.0f, 1);
plot(-550.0f, 3.0f, 50.0f, 1310.0f, 4.0f, 0); // 0 - pionowo
plot( 50.0f, 3.0f, -600.0f, 1200.0f, 4.0f, 1); // 1 - poziomo
plot( 650.0f, 3.0f, 50.0f, 1310.0f, 4.0f, 0);
plot( 50.0f, 3.0f, 695.0f, 1200.0f, 4.0f, 1);
stodola(10.0f, 0.0f, 2.0f, 40.0f);