Page 1 of 1

gyroscope

Posted: 11 Jan 2014, 11:17
by gabrielefx
Hi,
I'm developing a 3d interface that will run on a tablet Surface.
The question is: how to handle the gyroscope of this device?
If I try to rotate the device the graphic hangs, I can lock it.
I would like to use a node that rearranges easily the Ventuz graphic in landscape or vertical position.

regards

Re: gyroscope

Posted: 12 Jan 2014, 06:24
by Christian Krix Schmidt
Use an axis node to rotate your content. Obviously because of the totally different aspect ratio you need to re-position your user interface elements. Animate this re-positioning and combine it with the axis rotation into one keyframe animation and you have your landscape/portrait-switcher.

Re: gyroscope

Posted: 22 Jan 2014, 09:34
by gabrielefx
thank you,
but how connect Ventuz to the tablet's (Microsoft Surface 2) gyroscope?
How can I get the data of the orientation?

regards

Re: gyroscope

Posted: 22 Jan 2014, 10:22
by Karol
Hi!

You would need to use the Script node and connect to the Windows API which provides Sensor information like orientation and acceleration etc.

Cheers
Karol

Re: gyroscope

Posted: 22 Jan 2014, 12:20
by Christian Krix Schmidt
I don't have a surface tablet but does the screen resolution swap as well when rotating 90 degress? Usually you have a resolution like 1920x1080 pixels. If you rotate the tablet 90 degrees does the resolution change to 1080x1920? What does the Viewport node output in both situations? If there is a difference you could use the change in its output values as a trigger for the transition.