-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfixedosg2.py
More file actions
33 lines (24 loc) · 807 Bytes
/
fixedosg2.py
File metadata and controls
33 lines (24 loc) · 807 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 StimulusOSG2Controller
# an osg file containing a grow/shrink animation
p = os.path.abspath('./scaledanim4.osgt')
vr = StimulusOSG2Controller(server_ids=['default-id'])
h = None
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:
h = vr.load_osg(p)
if i == 30:
h.move(0.15, 0.15, -0.05)
if i == 40:
h.animation_start('ArmatureAction')
# fixed - the animation still works after being moved
if i == 80:
h = vr.load_osg(p)
h.animation_start('ArmatureAction')
h.move(0.15, 0.15, -0.05)
time.sleep(0.1)