x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Orthographic camera ignoring depth?

Hi, I have a 2D game where I've put different sprites on the scene on top of each other, but it seems that the orthographic camera I use ignores depth, and therefore some sprites that should be in front of the others, don't show up, just sometimes, or just behind the actor that I've put behind them.

When I switch to perspective mode, everything works fine. The problem with that is that I need an orthographic camera( I've got a sprite that follows the finger of the player where the screen is touched, and this only works with orthographic properly)

Is there a workaround?

Product Version: UE 4.8
Tags:
more ▼

asked Jul 02 '15 at 04:12 AM in Using UE4

avatar image

AronD
88 6 13 21

avatar image keyle Nov 09 '15 at 03:40 AM

bump? anyone has a solution?

avatar image Achilleon Nov 09 '15 at 03:50 AM

Have all your 2d Flipbooks have translucent materials and fiddle with the sort order.

avatar image keyle Nov 09 '15 at 04:11 AM

What if I'm using sprites created straight from images, no flipbooks or particular materials? They're all using TranslucentUnlitSpriteMaterial.

avatar image Mr.Lzcc Apr 22 '18 at 07:39 AM

I also encountered the elements in the orthogonal camera scene that have no hierarchy to the back and forth.

How do you solve this problem?

avatar image goncasmage Apr 22 '18 at 08:01 AM

There should be some way to change that through some sort of sprite zorder, like you would in UMG. Can you change the position of the sprite in the z axis?

avatar image Mr.Lzcc Apr 22 '18 at 09:21 AM

Yes, I did it now, because I changed the material, The material has an Alpha before。

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hi everyone,

Unfortunately Orthographic cameras are not intended to display depth. I did just check on my end and layers still appear to be working correctly, however once the game is run the orthographic view will not display depth, whatever is closed to the camera will appear on the topmost layer. For additional information on orthographic cameras, please take a look here:

https://en.wikipedia.org/wiki/Orthographic_projection

If you are looking to display depth in a 2D environment, you will need to utilize a perspective camera positioned to display depth while maintaining a 2D view. You can find additional information on perspective cameras here:

https://en.wikipedia.org/wiki/Perspective_(graphical)

more ▼

answered Nov 18 '15 at 09:47 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I know this post is older than hell ,but I found that using this feature on 4.20 respect depth even in orthographic cameras.alt text

more ▼

answered Oct 27 '18 at 09:50 PM

avatar image

Manoloon
67 6 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question