Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 ryf9059 · Apr 10, 2013 at 07:10 AM · cameraeditorrenderingrendertextureperspective

Object shown on top of another, rendering priorities?

I'm making a 2.5D game where textures are 2D but the placement is actually in 3D.

While in editor (both in game view and scene view) I saw part of the object of further distance gets rendered above those that are in front of it.

As you can see I have 3 textures on different axis (ISO on the left and pers on the right) and should be shown in order from left to right. See:

order view

But in the editor, while viewing it from certain different perspective, part of the texture in the middle will over-cover the one in front of it. The rendering order is also wrong in the game view (little window with blue background at top left). See screenshots:

alt text

Why does this happen? Is there a way to set render priorities according to z axis? I only want to use one camera

sceneview1.png (436.8 kB)
zaxisview.png (47.3 kB)
Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Fattie · Apr 10, 2013 at 07:13 AM

the green boxes are colliders. are you using them for any reason? delete all colliders if you don't need them.

i can't see what's going on, but are they simply too close together? normally you just use a meter per layer for convenience in 2.5D. so the spaceships are at "1" and the clouds are at "2" etc etc.

So very simply give them a good separation (one meter each) to check it is not simply z-fighting since they are too close


Regarding your comments below

  1. are you aware of orthographic view on the camera? Search on 100s of answers here or read the doc. Look at your camera. Click it. Look at the inspector. Select orthographic, not perspective. All 2.5D games are orthographic

  2. very simply as a test, do this: Hit play. Now move the items further apart. Does it solve the problem, yes or no?

cheers

If your problem is solved pls click the TICK icon on the left, and don't hesitate to ask a new specific question.

Comment
Add comment · Show 4 · 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
avatar image ryf9059 · Apr 10, 2013 at 08:07 AM 0
Share

Yeah, I'm using the button one for tile so player sprite can land on it, the other two is for triggers. I want to have multiple layers to achieve parallax scrolling effect, same texture appear at different distance will have show in different size in perspective few, so if I separate them too far they will be too small to see

avatar image ryf9059 · Apr 10, 2013 at 08:27 AM 0
Share

I'm aware of arthographic camera but didn't use it since all layer will move at the same speed which defeat the purpose of parallas scrolling. Also I might want to do some "hack" in layer stage: assign normal map to some textures and add a light source so it casts selfshadow, I'm afraid in orthographic mode this will not work since I never get a chance to see the texture with light source from a different angle

avatar image ryf9059 · Apr 10, 2013 at 09:16 AM 0
Share

After switching for orthographic view, the problem is gone in the game view but still exists in the scene view (consider they are really close tho). I will try your approach to separate then further For parallax scrolling is there a package you can recommand? Also do I need to make sprite smaller for each layer? (by scaling or creating mipmap if that's appropriate).

alt text

avatar image Fattie · Apr 10, 2013 at 09:44 AM 0
Share

if you have new separate questions, close this question and ask new questions, many people will be pleased to help you

very simply

as a test,

do this: Hit play. Now move the items further apart. Does it solve the problem, yes or no?

avatar image
0

Answer by dreammakersgroupAdmin · Apr 10, 2013 at 07:59 AM

if you are using transparent shader the object will be sorted in rendering from nearest to furthest, for some reason unity think object behind is nearest, please check the pivote of objects , each object pivote should be at center or bottom of the object

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

12 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

Related Questions

How to call Camera.Render from Update 1 Answer

RenderTexture captured from camera with post effects only shows the emission pass. 1 Answer

How to make a custom GrabPass-like sampler2D in MRT shader? 0 Answers

ClearFlags don't seem to work when I manually call Render() on my cameras. 0 Answers

Rendering a 3D object within a specific area/bound? 1 Answer


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