#1
|
|||
|
|||
World/Origin Shifting and Rotation
Hello, I'm creating a project using Vizard 3.18 for human reaction testing. However, our lab is quite small, and we need to make maximum use of the space. To this end, I'm trying to shift the origin of our world within environment a few meters and rotate the x and z axes by approximately 45 degrees to take advantage of additional diagonal space. Is there an easy command to do this, or am I stuck applying this transformation to every object I add into the world?
|
#2
|
|||
|
|||
I've recently discovered the HMD.__init__ function within vizhmd.py which is extended by nvis.py, which my program is currently using to access the HMD. However, I'm not really sure how to use this to apply changes.
|
#3
|
|||
|
|||
Actually, I think I'm better off using the viz.link functions, if I'm reading the WorldViz documentation correctly. Does anyone have experience with these?
|
#4
|
|||
|
|||
Do you want to offset the viewpoint linked to tracking data? If so, take a look at the following code. Using the <link>.postTrans and <link>postEuler operators, the viewpoint is offset 1 meter in height and 45 degrees in yaw from the tracking data.
Code:
link = viz.link(tracker,viz.MainView) link.postTrans([0,1,0]) link.postEuler([45,0,0]) |
#5
|
|||
|
|||
what if you're not using an HMD? i'm having a similar issue, but for testing purposes i can't use these methods to apply world transformation (there's no link). what could you do to rotate the world/translate the origin without the link?
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|