-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvrTimer-drivenKey.py
More file actions
29 lines (21 loc) · 867 Bytes
/
vrTimer-drivenKey.py
File metadata and controls
29 lines (21 loc) · 867 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
'''
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.
'''
import math
car = findNode("Car")
tireFront = findNode("Tire_Front")
tireRear = findNode("Tire_Rear")
def drivenKey():
tireDiameter = 300
carPos = car.getTranslation()
tireRot = carPos[0]*(tireDiameter*math.pi)/1000
tireFront.setRotation(0,tireRot,0)
tireRear.setRotation(0,tireRot,0)
timer = vrTimer()
timer.connect(drivenKey)
timer.setActive(1)