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 dansav · Jul 02, 2019 at 06:37 PM · physics settings

Gravity is different on ios for Unity 2019

The gravity on an ios build seems to be less than 1/2 what it is in the editor. I've checked and changed the targetFrameRate and it doesn't seem to make a difference. I put a fps counter and it seems to be the same in the editor and ios but the gravity is still slow. I'm using 2019 and this did not happen with previous versions. Seems to only be affecting gravity not forces. All other physics and time settings are default. What else could cause physics speed changes?

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 JonPQ · Jul 02, 2019 at 10:32 PM

gravity / physics has changed at least once before, when Unity changed the physics engine. (totally borked my mobile game) Check to see if unity has changed the physics engine in 2019 compared to the previous version you were using.

Comment
Add comment · Show 4 · 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 Bunny83 · Jul 02, 2019 at 11:13 PM 0
Share

As long as I can remember Unity had always used Nvidia's PhysX engine. Yes they did update to newer implementations (since Unity had gone a long way already) but it's always the same physics engine. Unity had additionally implemented 2d physics aside of the usualy 3d physics and is using Box2D since the first day of Physics2D. Though even between different implementations there shouldn't really be a major behaviour difference. Also the default gravity acceleration is set to -9.81 units per second squared in the player settings and that also never got changed.


It's more likely that there is some "force adding" code in his project that is not inside the FixedUpdate callback. The point of FixedUpdate is to provide a fix call count per second (by default 50 calls). The actual visual framerate is usually irrelevant if everything is done right.


@dansav if you want other people to reproduce your case you should tell us your exact Unity version. Are you sure you don't use an alpha or beta version? So theres no "a" or "b" in the version code but ins$$anonymous$$d an "f"(final) or "p"(patch)? I don't have a mac nor an IOS device so I can't verify or reproduce this issue. Even it's possible that there might be a bug in a recent release, it's very unlikely. Do you actually see this change only on the iOS device but not in the editor? Or has the overall functionality changed?

avatar image Bunny83 Bunny83 · Jul 02, 2019 at 11:21 PM 0
Share

Just did a quick check: the latest Physics engine update was in Unity version 2018.3 where they actually updated to the latest PhysX version. There are some $$anonymous$$or default value changes in the versions between. However nothing that should break gravity. The acceleration is defined in unity per second squared. So that's a fix amount. As long as you don't mess with Physics.gravity in code there should be no reason for it to change. This of course assumes that time still increases at one second per second ^^.

avatar image dansav · Jul 03, 2019 at 03:04 AM 0
Share

Unity 2019.1.1f1 I tried a basic scene with gravity and it appears to be the same in both ios and editor. $$anonymous$$y scene does have some extra forces, but it is in the fixedUpdate loop so it shouldn't change anything but apparently it does. Either that or it's something to do with drag. But in the past everything was exactly the same in editor and ios.

So maybe something is going on with rb.AddForce(acc,Force$$anonymous$$ode.Acceleration) or drag related to ios. I'll have to do some more experiments to find out.

avatar image JonPQ dansav · Jul 08, 2019 at 03:36 PM 0
Share

as Bunny83 says, fixed update is called not once pre frame, but once per fixed update time step.. so if your time step got reset or changed when you updated, your acceleration from your timestep will change, unless you as factoring in the timestep in your force adding. (note, the time should be the timeStep, not Time.deltaTime)

@Bunny83 , Unity didn't change the engine, but a few years ago they did previously Update it, making some fundamental changes, especially to the wheel collider / car physics. Probably does not apply in this situation, but I did see they were going to add a second physics engine option to unity sometime in 2019 or soon https://blogs.unity3d.com/2019/03/19/announcing-unity-and-havok-physics-for-dots/

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

109 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

Related Questions

Gravity y is stronger than x 0 Answers

Is there a physics debug draw option? 0 Answers

Physics have changed since upgrade to unity 5. 1 Answer

How can i make the ball in a Pong game move without using rigidbody function and bouncy (Physics Material) 0 Answers

Ball not rolling naturally 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