Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • 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
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

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
1
Question by glider521al · Jan 16, 2013 at 05:24 AM · cameraguirenderingzoomorthographic

flickering lines when zooming fov (both GUI and ortho cameras).

I swapped from using planes with an orthographic camera to using OnGUI draw calls, because of flickering that occurred when moving the camera around and zooming out.

Now I notice a similar problem when scaling the GUI.


 int px = -Screen.width / 2;
 if (zoomX > 0)
 {
 px = px * -1 ;
 }
 int py = -Screen.height / 2;
 if (zoomY > 0)
 {
 py = py * -1;
 }
 GUIUtility.ScaleAroundPivot(new Vector2(zoomX, zoomY), new Vector2(px, py));
 //Onto draw textures



Textures larger than 128 * 128 pixels, have lines drawn on them out of nowhere and gaps between them.

Compare this (zoomX=1 zoomY=1) Zoom level 1

With this (zoomX=0.75 zoomY=0.75): alt text

The lines keep flickering as the area rendered moves.

Why is this the case? How can I fix it?

This has been driving me mad for the entire day now :( Please help!

flickeringlines.png (26.3 kB)
flickeringlines2.png (18.1 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

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by glider521al · Jan 16, 2013 at 12:04 PM

It's okay guys, found a solution.

Simply set the wrap mode of each texture to clamp and used GUI.drawTexture instead of graphics.DrawTexture

and that fixed it. :)

Comment
Add comment · Show 1 · 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
avatar image Bunny83 · Jan 16, 2013 at 01:00 PM 0
Share

Thanks for co$$anonymous$$g back ;)

I'll accept your answer for you so you get the karma ;)

Such questions are quite rare:

  • Good question title

  • Problem well explained (with screenshots)

  • Simple and straight forward solution

avatar image
0

Answer by Imankit · Jan 16, 2013 at 06:36 AM

I think the Camera should always be moved in LateUpdate... As when we move the camera with the position of the object in Update or OnGUI it flickers.. But if we move the camera in LateUpdate first the object takes position in Update then camera sees it in LateUpdate...

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.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do you zoom with an orthographic camera? 1 Answer

Dynamic Orthagraphic Camera Zoom 1 Answer

zoom in with orthografic camera with focus on the a specific point 0 Answers

Raycast misses after camera zoom 2 Answers

How to zoom in smoothly with orthographic camera? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges