Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 Mr Greebone · May 31, 2015 at 08:16 AM · 2dspritebugscalebackface

Sprites are invislbe if rotated or if scale is inverted in game build

Hey everyone, id love some input into how to resolve this issue im having in Unity 5 2d.

now my player rotates by inverting its x axis in the scale, to explain all my sprites face right and have an x value of 1 in the scale, so to make them look left i change the sprites value to -1, simple stuff and when looking at it in the editor it seems to work fine.

however i recently built a scene of my game and noticed that whenever the player looks left or when its scale.x was -1 then it would appear not visible but would apear again when facing right or when the scale.x was 1.

now i did some testing with blank scenes with zero scripts in them and notated that both sprites rotated 180 degrees on the y axis and with a scale of -1 would appear invisible to the camera and wouldnt be visible when the game was built but would be in the actual editor when testing it out.

if this is a bug with unity how would i go about fixing it, how do i make it so my camera can see a sprite when its transform or rotation is inverted, i heard someone mention something along the lines of backface culling but have no idea how to implament italt text

here is a picture to explain a little further

EDIT: after several hours of toiling i have descovered how to fix the issue but am unsure how exactly this fixed the issue

if you put in any scene a sprite with no material and therefore no shader and that scene is playing in the built game then the sprites are visible regardles of if they are inverted via the scale or not and all scenes loaded or played after this will work regardless of weather or not they contain a sprite with no material attached

im unsure as to why this worked but can only assume it has something to do with the shaders, is should be noted all my sprites are using the default sprite material if that helps

any ideas?

kek423423552.png (7.1 kB)
Comment
Add comment · Show 1
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 rage_co · Jul 19, 2021 at 10:31 AM 0
Share

backface culling is an option, but using the flip X and flip y property of the sprite renderer is a much more effective and convinient method

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by blue2venom · Jul 20, 2021 at 11:39 AM

If you go all the way down and change the shader from standard or whatever it is to sprites/default that will let you use colours,If you go all the way down where it says shade and click on standard and change it to sprites/default for if u need colors

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Adjust overlay position for different resolutions 0 Answers

Changine scale with moving center 0 Answers

Why are downscaled sprites blurry? 1 Answer

Sprite changing position during rotation...bug? 0 Answers

Direction and Point Light light up opposite sides of object 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