Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Attach image plane to camera?

Discussion in 'Scripting' started by aerende, Dec 28, 2010.

  1. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    Is it possible to attach an image plane to a camera so that as the camera moves away from the image plane, the image plane scales larger. In this way the boundaries of the image plane are always outside the field of view of the camera?

    I know it is possible to do this in Maya, but I'm curious if it is possible to do this in Unity?
     
  2. Jesse Anders

    Jesse Anders

    Joined:
    Apr 5, 2008
    Posts:
    2,857
    This sounds like something you'd probably want to use a separate camera for.

    Can you tell us what problem you're trying to solve exactly? What is the image for? Is it a background image of some sort?
     
  3. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    @Jesse Anders -

    Right it is a background image, and right now the camera is very close to the background image plane. There is some distortion on the sides, so I'd like to be able to move the camera back until the distortion on the sides goes away. It would be nice if the background image scaled automatically as the camera moved away, instead of my having to scale the background image.
     
  4. Jesse Anders

    Jesse Anders

    Joined:
    Apr 5, 2008
    Posts:
    2,857
    Is the background image always supposed to remain fixed as far as the viewer is concerned? Or does it scroll or otherwise move in some way?
     
  5. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    @Jesse Anders -

    The background image is always fixed as far as the viewer is concerned.
     
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,244
    Use a GUITexture with the pixel inset values set to 0 and the scale set to (1, 1). Use two cameras so objects can appear in front of the GUITexture camera.

    --Eric
     
unityunity