Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

rectangle box "parallax" rotate effect with gyroscope for android app

Discussion in 'Image Effects' started by jazzbach, Oct 29, 2021.

  1. jazzbach


    May 11, 2016

    I'm trying to do an app that uses the gyroscope to rotate a 3D environment (or the camera, whatever works better). The 3D environment is a simple box without the cap (only the inner part of the box is visible). I know there are some examples out there. However, what I'd like to do is to make sure that the camera near plane's four corners always match the four corners of the box, no matter how the user is turning the phone.

    I'm attaching an example of what I'm trying to do (what would happen if the user was rotating the cellphone):

    Maybe the solution is not as complex as I might think but right now I'm kind of clueless on how to approach this problem. Any help of link to more information will be really appreciated .

    Thanks beforehand !