Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 N3W4rk · Jul 10, 2017 at 11:00 PM · physicsscalingmobile devicesonline gameformula

Scaling a force according to objects' size

Hello, I can't seem to find a solution for my problem anywhere, so here it is: I'm working on an online turn-based 2D game for mobile where 2 players "shoot" pawns placed on a board to eject those of their opponent out of this board.

The issue is caused by the scaling of the objects: the board usually takes the whole device's width and is squared and the pawns are scaled following the same ratio. But since the board is actually bigger when the screen resolution is higher, the force should be "scaled" to match this difference so that any player plays the same game.

I couldn't find a good workaround or a mathematical expression (like a formula to calculate the force needed to go to a given distance) that would allow me to fix this. The pawns are only slowed by a linear drag (and their mass), there is no gravity.

I'm ready to provide any information needed. Thank you!

Comment
Add comment · Show 8
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 Cornelis-de-Jager · Jul 10, 2017 at 11:26 PM 0
Share

I am uncertain of what you are trying to do. Its not clear to me.

avatar image N3W4rk Cornelis-de-Jager · Jul 11, 2017 at 12:41 AM 0
Share

Let's say the board is a grid and one player pushes an object. It moves a certain distance due to the force applied, 2 squares for example. But for the other player, the grid's size is different due to scaling and with that same force, the object only moves 1 square away, because squares are bigger. I'm looking for a way to adjust this force so that it would actually move 2 squares away too.

avatar image Cornelis-de-Jager N3W4rk · Jul 11, 2017 at 12:44 AM 0
Share

Is the scale universal for each player. Like if p1 board is scale 1 then the cube will be scale 1 as well. And if p2's board is scale 1.75 then p2's board will be 1.75 as well?

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by dardamavet · Jul 11, 2017 at 02:25 PM

I would suggest not scaling the world objects themselves, but adjusting the aspect-ratio of the camera.

Perhaps this can be helpful: http://gamedesigntheory.blogspot.co.il/2010/09/controlling-aspect-ratio-in-unity.html

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

112 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

Related Questions

Make my 3D Game resolution fit all mobile devices 0 Answers

Creating Physical Border around Edges of Device Screen 1 Answer

Mobile 2d Game Resolution scalling 0 Answers

What should my gravity be if I've modeled in feet and inches in Max? 3 Answers

Instantiate Objects responsively [2D] 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