-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvrTimer-syncZPosToObj.py
More file actions
30 lines (23 loc) · 998 Bytes
/
vrTimer-syncZPosToObj.py
File metadata and controls
30 lines (23 loc) · 998 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
'''
DISCLAIMER:
---------------------------------
In any case, all binaries, configuration code, templates and snippets of this solution are of "work in progress" character.
This also applies to GitHub "Release" versions.
Neither Simon Nagel, nor Autodesk represents that these samples are reliable, accurate, complete, or otherwise valid.
Accordingly, those configuration samples are provided ?as is? with no warranty of any kind and you use the applications at your own risk.
'''
box = findNode("Box")
sphere = findNode("Sphere")
timer = vrTimer()
timer.connect("syncZPosToObj()")
timer.setActive(1)
def syncZPosToObj():
positionBox = box.getWorldTranslation()
boxX = positionBox[0]
boxY = positionBox[1]
boxZ = positionBox[2]
positionSphere = sphere.getWorldTranslation()
sphereX = positionSphere[0]
sphereY = positionSphere[1]
sphereZ = positionSphere[2]
sphere.setWorldTranslation(positionSphere[0],positionSphere[1],positionBox[2])