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
0
Question by ZuPe2112 · Jun 15, 2015 at 04:50 AM · spriterenderdisplayflickeringmipmaps

2D sprite flickering if mipmap disabled - UPDATED

Hello, i'm working on a 2D game. I've built it on Android and tested on several devices. Everything works fine in almost all the cases, except on just one device where some sprite looks like it has been chopped in pieces and mixed together without any order. The final effect is obviously awful!

The Android version on that device is older but i've tried also on other devices with the same operating system version and everything looks fine.

The suspicious fact is that this bug only shows on png that i have drawn on my own, so maybe i need to set some property before to import them in Unity.

Anyway, all the png are already set to Sprite Mode: Single and Format: Truecolor.

Can anyone help, please?

UPDATE - The problem was about mipmaps, disabling them solved the problem. But now i have a strange flickering effect on some sprite borders... any idea?

UPDATE 2 - This is my gameobject update function:

 void FixedUpdate ()
     {
         if (bh_rotating)
         {
             transform.Rotate(Vector3.forward * 12f);
             bhDestroyDelay -= Time.deltaTime;
             if (bhDestroyDelay <= 0)
                 main.DeleteAstro(this.gameObject, false);
         }
 
         if (beans)
         {
             amplitude = 0.8f;
             frequency = 1.0f;
             rigidbody2D.velocity = Vector3.right * 2;
             
             transform.Rotate(Vector3.forward * 2.5f);
             transform.position += amplitude * (Mathf.Sin(2 * Mathf.PI * frequency * Time.time) - Mathf.Sin(2 * Mathf.PI * frequency * (Time.time - Time.deltaTime))) * transform.up;
             
         }
         else
         {
             this.rigidbody2D.AddForce(-Vector2.right * 1 * Time.deltaTime * direction);
             this.transform.Rotate(Vector3.forward * direction * 0.5f);
         }
     }


variables beans and bh_rotating start with false values, so in normal conditions the interesting part is the "else" statement

Comment
Add comment · Show 8
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 digzou · Jun 15, 2015 at 11:05 AM 1
Share

Disable generate mipmaps.

avatar image ZuPe2112 · Jun 16, 2015 at 08:31 AM 0
Share

Thanks digzou, that solved the problem! :)

But now i have a strange flickering effect on sprites borders... any idea?

avatar image digzou · Jun 16, 2015 at 12:29 PM 0
Share

are you updating the sprite in an update function??

avatar image ZuPe2112 · Jun 16, 2015 at 12:42 PM 0
Share

of course i use an update function to work on that game object, but what do you mean with "updating sprite"? changing the source image file? i'm not doing something like that

avatar image digzou · Jun 16, 2015 at 01:02 PM 0
Share

can you share the snippet of your update function where the gameobject is being updated? The flicker could be because of FPS drop or that the Z of the camera or the sprite is being changed.

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

sprite power of two and sprite packer 0 Answers

getting mip mapping to work on sprites 0 Answers

Runtime Quality Setting Changes for Sprites 1 Answer

problem with small sprites/ missing pixels and flicker when moving 1 Answer

Sprites showing up distorted even with PO2 dimensions. 0 Answers


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