diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-12 13:41:37 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-12 13:41:37 +0200 |
| commit | 6ae016f31d6fab1b7976ad3a11526c69bf90b470 (patch) | |
| tree | 40a7426d0536c3fdeade0e561930f8f771c1d40a /src/game.c | |
| parent | f9864b4a94e14f3609de7e268a8dd511f7663ebc (diff) | |
space parallax
Diffstat (limited to 'src/game.c')
| -rw-r--r-- | src/game.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -353,12 +353,12 @@ static void move_camera(platform_window* window) { float speedx = window->width / 1000.0f; float diffx = (_next_camera_pos.x - _global_camera.x); if (abs(diffx) <= speedx) diffx = 0.0f; - speedx += (abs(diffx)/200.0f*speedx); + speedx += (abs(diffx)/50.0f*speedx); float speedy = window->height / 600.0f; float diffy = (_next_camera_pos.y - _global_camera.y); if (abs(diffy) <= speedy) diffy = 0.0f; - speedy += (abs(diffy)/200.0f*speedy); + speedy += (abs(diffy)/50.0f*speedy); float length = sqrt(diffx * diffx + diffy * diffy); if (length == 0) length = 1.0f; |
