• 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
Question by turngF · Dec 01, 2017 at 01:18 PM · camera2d gametutorial

about camera in 2D

i learn with tutorial named 2d roguelike , and when i finish GameManager and run game,i find camera cannot catch anything but black,like this: alt text

i doubt my camera setting has some problems:so how to do with it?alt text

cameraa.jpg (61.7 kB)
setting.jpg (65.1 kB)
Comment

People who like this

0 Show 4
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 LilGames · Dec 01, 2017 at 03:26 PM 0
Share

Do you have any errors in the Output Console?

avatar image turngF LilGames · Dec 02, 2017 at 03:05 AM 0
Share

none error

avatar image FunIsDangerous · Dec 02, 2017 at 07:10 AM 1
Share

since the background is set to black, I assume the camera has nothing to show other than the background. First of all, are you sure the problem exists in play mode, and not just in this preview? Also, make sure the camera is rotated the correct way. I see the rotation being 0,0,0. I can't quite tell, but that seems to be a top-down game, shouldn't the camera be pointing down? Other than that just try playing with the values(variables of the camera) around a bit

avatar image turngF FunIsDangerous · Dec 06, 2017 at 02:22 AM 0
Share

oh,sorry for my beginner fault,i change the z position to negative and it looks perfect,thanks for so detailed answer

3 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Larry-Dietz · Dec 06, 2017 at 06:07 AM

Without seeing how everything else is positioned, my best guess is that you need to change the Z on the camera back a bit, maybe -10

My though is that the camera is at the same level as the rest of the game objects, too close to actually see them.

Hope this helps, -Larry

Comment
turngF
Hellium

People who like this

0 Show 0 · 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

Answer by Actnshj200 · Dec 06, 2017 at 06:13 AM

Try positioning your camera to where it fits your map first. Then check from there. The black means the camera is still showing the background and your camera isn't positioned on the map yet.

Comment
turngF

People who like this

1 Show 0 · 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

Answer by LilGames · Dec 04, 2017 at 03:29 PM

Change the Z position...

Comment

People who like this

0 Show 1 · 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 turngF · Dec 06, 2017 at 02:26 AM 0
Share

Oh,it goes right,thanks a lot!But why the z position needs to be negative?

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

125 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

Related Questions

How do I stop my camera rotating with my player? 0 Answers

Is it possible to obscure 2D objects behind a transparent mesh? 2 Answers

Camera Z Position moves to Zero, when a Rigidbody2D is added to a gameobject 0 Answers

Unity is displaying UI elements behind background image 2 Answers

Unity2D Action when object close to Camera 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