From d88fabecd34214605ec7e0f3ba71bce1224bd88b Mon Sep 17 00:00:00 2001
From: Micah Elizabeth Scott <micah@scanlime.org>
Date: Sun, 9 Mar 2014 19:25:50 -0700
Subject: [PATCH] Fix XYZW speed timestep

---
 examples/cpp/rings.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/examples/cpp/rings.cpp b/examples/cpp/rings.cpp
index a600c02..a274b85 100644
--- a/examples/cpp/rings.cpp
+++ b/examples/cpp/rings.cpp
@@ -18,9 +18,9 @@ public:
     Rings()
         : d(0, 0, 0, 0) {}
 
-    static const float xyzSpeed = 0.006;
+    static const float xyzSpeed = 0.6;
     static const float xyzScale = 0.08;
-    static const float wSpeed = 0.002;
+    static const float wSpeed = 0.2;
     static const float wRate = 0.0001;
     static const float ringScale = 1.5;
     static const float ringScaleRate = 0.01;
@@ -48,11 +48,11 @@ public:
         // Rotate movement in the XZ plane
         float angle = noise2(f.time * 0.01, 30.5) * 10.0;
         float speed = pow(fabsf(noise2(f.time * 0.01, 40.5)), 2.5) * xyzSpeed;
-        d[0] += cosf(angle) * speed;
-        d[2] += sinf(angle) * speed;
+        d[0] += cosf(angle) * speed * f.timeDelta;
+        d[2] += sinf(angle) * speed * f.timeDelta;
 
         // Random wander along the W axis
-        d[3] += noise2(f.time * wRate, 3.5) * wSpeed;
+        d[3] += noise2(f.time * wRate, 3.5) * wSpeed * f.timeDelta;
 
         // Update center position
         center = Vec3(noise2(f.time * wanderSpeed, 50.9),
-- 
GitLab