OSDN Git Service

fix shift FACTOR
[meshio/pymeshio.git] / examples / opengl / rokuro.py
index fd9eaff..4871292 100644 (file)
@@ -31,8 +31,9 @@ class RokuroView(baseview.BaseView):
             self.distance*=0.9\r
 \r
     def shift(self, dx, dy):\r
-        self.shiftX+=dx\r
-        self.shiftY+=dy\r
+        FACTOR=0.001\r
+        self.shiftX+=dx * self.distance * FACTOR\r
+        self.shiftY+=dy * self.distance * FACTOR\r
 \r
     def rotate(self, head, pitch):\r
         self.head+=head\r