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 Rphysx · Sep 25, 2014 at 12:59 PM · scalingpixelsunitper

Unity scaling

Hi, I'm basically trying to understand more how unity scaling and pixel per unit system works. I'd like to understand why to have pixel perfect positioning (so that a single sprite represents an object whose bounds are respectively 1f wide on the x axys and 1f tall on the y) i need to put 32 on pixel per unit in the sprite menu.

I'm not asking for you to explain it, any reference / official guide is much more appreciated, since it seems I cannot find it by myself

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
1
Best Answer

Answer by HarshadK · Sep 25, 2014 at 01:12 PM

For understanding this unit to pixel even though there is not much write up material available with the Unity that explains it but the principal actually applies to most of the game engines.

There is actually quite discussion about that over Box2D forums. One of the paragraphs states that:

Box2D physics objects are defined with meters for length and width. Box2D is tuned for a 1x1 meter sized objects. The reason you want PTM (Pixels to Meters) is that you do NOT want to have a 1 to 1 correlation between pixel size and meters size.

For example if you had a car that was 200 pixels long and 50 pixels tall, and you did not use a PTM conversion you would end up creating a Box2D car of 200 meters by 50 meters. That's 656 feet long or about the length of 12 semi trucks. Imagine the force you would have to apply to this car to move it.

In short what you do is you just separate the rendering from the physics calculations.

And the same principle applies to Unity also since all the physics and calculations in Unity are done in its own system which is MKS itself so the same principle applies here.

If you want to understand how this actually works read this article: Pixels

Let us know if this clarifies your queries or anything else is required.

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

25 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

Related Questions

A node in a childnode? 1 Answer

Scaling of GUILayout and GUI elements for android 1 Answer

Android Scaling - Yes, googled it. 0 Answers

Orthographic camera scale Problems? 0 Answers

Unity 4.6 and up have broken my sprite layers. How to fix? 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