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 rustbucket · Apr 07, 2014 at 06:49 PM · cameraresolution

Elements missing on Samsung Galaxy S4

Hello, this is going to be a tough one to describe but here goes...

My game was just published to the Google Play store but a few of my friends with high end Android devices like the S4 and HTC One that have resolutions of 1080x1920 are only seeing portions of my game. Specifically this is a portrait only title that has three sets of platforms. The bottom platform is set for y axis -2 and the top one 0.5. The ortho camera is set for 4.79. On other Android devices and the iphone everything is visible but on these two devices the platform at -2 is not visible making the game essentially impossible to play.

I'm really at a loss as to why this is happening, I've set up a game view within Unity with matching resolution and nothing seems to wrong. Just wondering if anyone else has had issues with gameobject layouts at high resolutions.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by supernat · Apr 07, 2014 at 07:05 PM

If the soft menu at the bottom of the phone is present, it reduces your maximum vertical field of view. Hmmm...there are a couple of solutions. One is to make your game disable the soft memu while it is active. The other, probably better way, is to get the max size of the display accounting for the soft menu being present.

Check this link for getting the "visible size": http://stackoverflow.com/questions/3060619/how-to-get-the-visible-size-on-an-activity

I would get the width and usable height of the device, then calculate the aspect ratio, and adjust the field of view based on that aspect ratio. What I mean is reverse calculate the FOV based on the world position -2 and 0.5, so that your camera's frustum covers both positions. Then apply the aspect ratio multiplier to it. That way you support all devices without any specialized code. I haven't done this in Unity but did it in a different game engine, which was all LUA, so I don't think it will help you to see that code. If you're using an orthographic camera, it shouldn't be hard at all. Perspective becomes more difficult, but still it just boils down to simple trig (something like cos(fov) = adjacent/hypot where adjacent is the world position in X to the platform (assuming you are looking forward) and hypot is the Z value to the platform.

If you're lucky, Unity already accounts for the visible size of the actual rendered View (not counting the soft menu) in the Screen.height value. I don't know. If not, you may have to query the Android through the JNIHelper classses.

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

22 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

Related Questions

Android hortographic camera cropping 1 Answer

Why Is My Orthographic Camera Not Rendering at the Full Resolution? 1 Answer

Fixing the camera's left side in a 2D Game in all screen resolutions 0 Answers

ScreenToWorldPoint not working properly on deployment 0 Answers

Is it possible to keep the player offset in place on the screen independent of resolution? 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