- Home /
HELP . 2d Sprite become invisible in camera position change !
HI
look at this images :
i have 2 game object . two 2d sprite that crated from "create->2dobject->sprite" menu . this sprites have a image of human body and bullet effect on it . as you see in first image bullet effect is good But when camera rotate around the human body , it disappeare (second image) !
for solving this problem i should move bullet effect sprite forward at least 1 unit in 3d world BUT it should be on human body and attache to it !
i change the 2d sprite to a 3d box that have a "Transparent/VertexLit" material . but this material have same issue with 2d sprite !
have can i solve this problem ?
"Excuse me for my bad english"
There are very little details over here . Can you paste some code (Camera movement ) and unity snippets showing position of camera and sprite (before and after movement ) ?
There are fair chances that this sprite/object is going out of camera's sight , when you're rotating/moving it .
there is no code here !
camera move with animation , sprite disappeare when camera move in front of it . sprite always is in camera's sight but it disappeare in different viewing angle !
Please see your camera's Clipping Planes settings. Try to extend these settings (i.e., set -500000, +500000 for experiment)
(It seems your object may disappear because it clipped when the camera rotates)
Have you tried changing the near and far clipping plane of the camera?
Have you checked the sprite renderer's ordering is correct too? Higher ordered sprites are rendered on top of lower ordered sprites.
The z distance between sprites have no effect on their ordering. That means that a sprite with a higher order in layer, that is technically behind another sprite in 3d space, will still be rendered in front.
thank u guys for your responds :)
dear snubblejr , u right . i change the sprites order and it solve :) thank u
post your comment as answer so i choose your answer and close the question .
Answer by SnubbleJr · Aug 19, 2015 at 07:48 PM
Have you tried changing the near and far clipping plane of the camera?
Have you checked the sprite renderer's ordering is correct too? Higher ordered sprites are rendered on top.
The z distance between sprites have no effect on their ordering. That means that a sprite with a higher order in layer, that is technically behind another sprite in 3d space, will still be rendered in front.
Your answer
Follow this Question
Related Questions
bullet hit effect material color be based off the object hit? 0 Answers
Unitys Particle System wont work like i want 0 Answers
How do I make this script emit different particles for different surfaces & objects? 2 Answers
Bullet impact effect not working. Made from a Brackeys tutorial 2 Answers
How to make bullet holes on terrain? 1 Answer