Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Moving camera perspective sideways when tilting device

Discussion in 'iOS and tvOS' started by johot, Jul 9, 2011.

  1. johot

    johot

    Joined:
    Apr 11, 2011
    Posts:
    201
    I'm trying to get the "hologram" effect by moving the cameras perspective when tilting the device.

    The effect can be seen in iPhone games like Illusion labs Labyrinth game (where you roll a ball using tilt). It can also be seen in games like HoloToy and MachDice.

    I got the tilting code all sorted out but now i'm trying to find the correct way of shifting the perspective sideways. So if I have a cube in the middle of the screen I should be able to see the sides or top/bottom by tilting the device.

    First I tried moving the camera sideways but that didn't look right. After that I tried rotating the cube instead which looks kinda good but still not as good as in the other mentioned games. When rotating the cube you don't really get the feeling of moving the perspective. I would kind of like to get the same effect as when moving the camera sideways but still having the objects remain in their original location and not moving left or right, just the perspective part of it.

    Is there some way to shift the perspective of the camera without moving or rotating it? Like skewing the perspective or something? Or how could I solve this?

    Thanks!
     
  2. kweiko

    kweiko

    Joined:
    Mar 9, 2010
    Posts:
    103
    Hey was wondering if you got this to work?