- Home /
sprite bug
Sorry if I'm confusing I have a problem where my stuff de-renders when I zoom in with an orthographic camera. I'm making a 2D game using pre 2D tools stuff and so far no textures have been dissapearing, since I've had the camera zoomed out quite a bit. But now that I need a closeup of the characters, they dissapear.
The wierdest thing is that the farther away the character is from world zero, the more frequent this happens.
I think this might be a unity bug or I'm just stupid. Anyone got any ideas?
I'm using the free spritemanager to animate my characters.
(I started on the project before 2D tools and I have waay too much code grounded in that, so it's very unlikely that I can change to the "new" 2D tools)
Picture of what happens: http://imgur.com/jgim4f2 (I didnt imbed it, since It's pretty annoying to have running whilst reading)
EDIT:
I figured out that the free spritemanager apparently centers ALL sprites to world zero. And once the orthographic camera can't see world zero anymore, the sprite de-renders!!
Now... How do I fix this? Turning off occlusion culling doesnt work
What are your far and near camera clipping plane settings? For example, I prefer using -1 for near and 100 for far.
The near and far clipping planes are fine. (0.3 - 60) The sprites mesh is within those. The problem is the occlusion culling. I figured out that the spritemanager, that I use center it's sprites according to world space and therefore their position center is allways (0,0,0). That's why when the camera goes too far away, they de-render. I'm currently trying to fix this by childing the spritemanager to the player and update the vertecies position according to local space ins$$anonymous$$d of world space.
Answer by ragnaros100 · Oct 28, 2014 at 12:33 PM
Fixed it. I just went through the spritemanagers' documentation and found a method that fixed the problem
Your answer
![](https://koobas.hobune.stream/wayback/20220613170144im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Is there any benefit to slicing in power of two dimensions inside a sprite sheet? 1 Answer
Multiple alpha maps / moving alpha maps 1 Answer
Transition Texture or Material horizontally 0 Answers
Retina textures on 4.3 2D Sprite Packer? 0 Answers
Changing texture depending on angle to another player 1 Answer