• 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 __Arber__ · Aug 08, 2020 at 02:15 PM · 2d sprites

Sprites clipping at the edge of the camera (2D)

Repost from https://forum.unity.com/threads/sprites-clipping-at-the-edge-of-the-camera-2d.947957/

I really need help... I'm literally out of my mind trying to fix this, no one had the same problem except this guy: https://answers.unity.com/questions/1546122/sprite-dissapears-near-edge-of-camera.html and he had no solution for that. I'm so desperate for a solution right now

Repost from forum:

So, after googling my problem for hours and finding only a single other question with the problem (but no solution), I have come to the conclusion that I must post here.

My problem is actually very simply, but I can't seem to find anything to fix it. I'm using URP with Post Processing.

The shadow is my own shader and is being a child of the original object (here: cactus)

Here is a gif of my problem: alt text

And my camera settings: alt text alt text

I just need the camera to render all objects in the view, but it seems like that the camera clips them too early.

Comment
Add comment · Show 3
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 Kaart · Aug 08, 2020 at 02:34 PM 0
Share

Without testing it, I think this behaviour is caused by frustum culling. Unity thinks the sprite is out of view of the camera and therefore doesn't render the sprite to save resources. I've found a possible solution on answers: http://answers.unity.com/answers/1137868/view.html.

avatar image __Arber__ Kaart · Aug 08, 2020 at 02:40 PM 0
Share

That's exactly what I'm thinking, because my shadow shader skews the object to the right and inverts the y position. And because I skew to the right, I'm not actually changing the object's bounds. Thank you, I will look into it

avatar image __Arber__ Kaart · Aug 08, 2020 at 04:47 PM 0
Share

Not working/or am too stupid to implement it. The post is also 10 years old :(

I somehow need to manipulate the bounds (of the sprite) to make unity think that it is indeed in view. One way would be to open my sprite in Photoshop, make the canvas size 3x bigger and safe it (it work indeed). Problem: I have to work with sprites that are not in their respective size. I need to find a way to do it per script.

Someone suggested mesh.bounds, but I'm using the SpriteRenderer (and I already tried manipulating everything with bounds on there). Guess I'm out of luck...

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

136 People are following this question.

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

Related Questions

Shader to flash a 2d sprite to white? 2 Answers

Destroy 2d sprite object 2 Answers

2D Characters and sprites on a 3D level/map 1 Answer

Make a sprite sheet 2 Answers

Dynamic spritemask from worldpoints? 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