• Unity
  • Services
  • Made with Unity
  • Learn
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Forums
  • Answers
  • Feedback
  • Issue Tracker
  • Blog
  • Evangelists
  • User Groups

Navigation

  • Home
  • Unity
  • Industries
  • Made with Unity
  • Learn
  • Community
    • Forums
    • Answers
    • Feedback
    • Issue Tracker
    • Blog
    • Evangelists
    • User Groups
  • Get Unity
  • Asset Store

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Reminent · Apr 07, 2016 at 05:38 PM · cameratexturescripting beginner

Render texture on slim plane

I'm working on a project where I'm using a render texture to show the view from a camera. I've placed the render texture on a plane but since the plane is very slim the view gets "squished" making it very distorted. Is there a way to keep the render texture the original size and instead choose the part I want to show? Something like this: alt text I started learning Unity last week so If you could give a code example or point me to a tutorial that shows how to do it I would really appreciate it.

example.png (4.6 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Winterblood · Apr 07, 2016 at 10:42 PM

You need to set the aspect ratio to match your render target. So if your side strip is 100x800, you want to set your Camera.aspect to 100/800 or 0.125.

[EDIT] Oh, you'll probably also need to shrink the Field of View then to frame whatever you're showing correctly. A wide FoV (eg. 60 degrees) is like having your eye right up to the slot, a narrower one (eg. 5 degrees) is like looking through the same slot from across the room.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Enforcing Higher levels of detail in textures 0 Answers

project uvs from cameras view using a material/shader 0 Answers

SetTexture on Quad black (but only on one camera) 0 Answers

Overlaying an image over a certain camera? 1 Answer

My GUI Texture Disappears? 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges