0
\$\begingroup\$

I'm trying to move child of camera object smooth. To implement that, I need to know the movement of x and y axis, like Input.GetAxis in general PC platforms.

I saw the documentation and examples of Google VR, but there's not much explained well. One thing I found is GvrControllerInput.Gyro, but it's said it's deprecated and use GvrControllerInputDevice.Gyro instead, but there's no Gyro value in GvrControllerInputDevice.

Seems like basic usage is totally changed, so they are not providing static methods, and force to using internal method of the object, but couldn't find any related information about this.

So, how do I get gyro from GvrControllerInputDevice? Or is there an alternative way to make child object rotate smooth from their parent? Any advice will very appreciate it!

\$\endgroup\$
  • \$\begingroup\$ Since this is a VR game, presumably your player's viewpoint camera is rotating to match the display device, right? Can you simply read the transformation of the camera object in your game scene, without looking at any VR-specific API? \$\endgroup\$ – DMGregory May 23 at 18:25
0
\$\begingroup\$

Check out the Gyroscope class

you can access using Input.gyro to get info from several different variables you may want.

you can still use Input.GetAxis("Vertical") or "Horizontal" to get the players x and y.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.