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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by otaviopadovani · Apr 05, 2012 at 09:08 PM · objectscaleorthographic

Making objects look further away in ortho cam

I am using an ortho camera for a 2D game I am making and I want my objects to scale properly since I can't use my Z-axis (AKA what is further away look smaller then what is closer). How should I do that? I'm getting my initial object position in relation to my camera since Im pretty sure Im going to use that data but I dont know where to go from there =/ HALP

Comment
Add comment · Show 2
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 kolban · Apr 06, 2012 at 04:16 AM 0
Share

You say you can't use the Z axis but never explained why not? Why can you not use a perspective projection from the camera and Unity will take care of depth perspective.

avatar image Eric5h5 · Apr 06, 2012 at 04:31 AM 0
Share

Yes, it sounds like you're making things unnecessarily complicated. Just use a perspective camera. You're not forced to use an orthographic camera just because you're doing a 2D game. (For example, Zombieville USA uses a perspective camera in order to do parallax scrolling in a 2D game in a simple way, by just letting Unity handle it.)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by robocognito · Apr 06, 2012 at 06:28 AM

You want to use an orthographic camera to keep things perpendicular to the screen, but still want items in the distance to scale down, there's a pretty obvious solution: Scale the objects in question.

Start by creating a script to scale the distant objects based on their distance from the camera. I'm not much of a coder, but that's where I'd begin.

Comment
Add comment · 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 TheHMC · Apr 28, 2015 at 09:47 PM 0
Share

I'm having the same problem. The prob with using perspective is if you have the camera stop following (like when the character reaches the edge of the map) then when you move the character up/down, it moves diagonally to the viewer. Whenever the character isn't centered on the screen, pushing up will make them move diagonally.

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to scale an object in editor with absolute or percentual values? 2 Answers

Object sizes from the asset store 1 Answer

Object changes shape randomly. 1 Answer

How do I scale an object or prefab to a size in Unity units? 1 Answer

How to find what object "scaling" number is 1 unit? 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