Translate view from sensor position to lens position?
Has anybody made a function to translate the viewpoint from the sensor position to the lens position on their hmd? I'm having a little trouble figuring out which method to use (preTrans, postTrans, or setOffset).
|
If your sensor contains both position and rotation data, then you need to apply a preTrans operator on the link to apply the offset between the physical sensor and actual eye position.
Example: Code:
view_link = viz.link(sensor,viz.MainView) |
Yes sensor has both position and orientation (IS-900).
I am trying to run this on update so that I can use the euler information to determine which directions to apply the translation. When I use preTrans the view flies off in one direction. I have tried subtracting the translation values from the preceding preTrans call, but that results in an accumulative translation error over time. I have also tried reseting each time before applying the preTrans. Both are commented out below. Thanks. Code:
import viz |
My mistake, I didn't realize preTrans was applied before rotation. Thanks for the help.
|
You should not call preTrans on every update. You only need to call it once when you initially setup the link.
Code:
import viz |
All times are GMT -7. The time now is 10:26 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC