From df5234b9afec34873f6b2ddb90a28151a512a092 Mon Sep 17 00:00:00 2001
From: stefan <stefan@5a81b35b-ba03-0410-adc8-b2c5c5119f08>
Date: Wed, 14 Apr 2010 12:09:47 +0000
Subject: [PATCH] dokk (the docking game):  - reduced translation speed when
 using 3DNav

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1995 5a81b35b-ba03-0410-adc8-b2c5c5119f08
---
 examples/dokk/spnav_input.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/dokk/spnav_input.py b/examples/dokk/spnav_input.py
index a016a6ffb..fe463ecc9 100644
--- a/examples/dokk/spnav_input.py
+++ b/examples/dokk/spnav_input.py
@@ -22,6 +22,7 @@ class SpnavInputDevice(QtCore.QObject):
     self.rot = True
     
     self._lock_input = False
+    self._trans_factor = 0.5
     
     self.score_scip = 0
   def SetLevel(self, level):
@@ -40,7 +41,7 @@ class SpnavInputDevice(QtCore.QObject):
       ligand = self.level.ligand
       transf = mol.Transform()
       if(self.trans):
-        delta = geom.Vec3 (tx/480.0, ty/480.0, -tz/480.0)
+        delta = geom.Vec3 ((tx/480.0)*self._trans_factor, (ty/480.0)*self._trans_factor, (-tz/480.0)*self._trans_factor)
         transf.SetTrans(delta)
       if(self.rot):
         rot=gfx.Scene().GetTransform().GetRot()
-- 
GitLab