-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathanimbugosg.py
More file actions
33 lines (23 loc) · 866 Bytes
/
animbugosg.py
File metadata and controls
33 lines (23 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import time
import os.path
import itertools
from freemoovr.proxy.stimulus_osg import StimulusOSGController
# an osg file containing a grow/shrink animation
p = os.path.abspath('./scaledanim4.osgt')
vr = StimulusOSGController(server_ids=['default-id'])
for i in itertools.count():
if i == 10:
vr.set_position(0.1, 0.1, -0.05)
# no bug, the object is moved to 0.15,0.15,-0.05, and then the animation (grow/shrink) starts
if i == 20:
vr.load_osg(p)
if i == 30:
vr.move_node('Icosphere', 0.15, 0.15, -0.05)
if i == 40:
vr.animation_start('ArmatureAction')
# bug - the animation moves from 0,0,0 to 0.15,0.15,-0.05 and grows/shrinks simultaenously
if i == 80:
vr.load_osg(p)
vr.animation_start('ArmatureAction')
vr.move_node('Icosphere', 0.15, 0.15, -0.05)
time.sleep(0.1)