Skip to content

Commit 92e1fb2

Browse files
committed
Ancienne modifs
1 parent 50da58a commit 92e1fb2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Togetic/Blender/PositionController.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import mathutils
22
import time
3+
import math
34

45
from Togetic.shm import shm
56
from Togetic.Blender.Receiver import Receiver
@@ -25,7 +26,7 @@ def run(self):
2526
self._owner.worldPosition = self._initPosition \
2627
+ mathutils.Vector((x, y, z))
2728
ori = self._owner.orientation.to_euler()
28-
ori.x = theta
29+
ori.x = -theta + math.pi / 2
2930
ori.y = -phy
3031
ori.z = psy
3132
self._owner.orientation = ori

Togetic/Server/AbstractServer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import sys
22
import threading
3+
import time
34

45
class AbstractServer(threading.Thread):
56
def __init__(self):
@@ -39,6 +40,7 @@ def run(self):
3940
while self._running:
4041
try:
4142
self._serve()
43+
time.sleep(0.005)
4244
except Exception as e:
4345
# print('Server `', self, '` stopped by an exception :', e, file=sys.stderr)
4446
self.stop()

0 commit comments

Comments
 (0)