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
1
Question by Mz3D · Nov 13, 2012 at 09:01 AM · rotationmobilespeedpcdifferent

Object rotation speed different on mobile

Hello! As you can understand from the title, i have some rotating objects in my scene that on mobile rotate slower than on unity game panel. This is not a performance issue since i have other objects that rotate at the same speed both on unity and on mobile. What can cause this?

Comment
Add comment · Show 3
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 AlucardJay · Nov 13, 2012 at 09:56 AM 1
Share

Are you doing those rotations in FixedUpdate? This is probably a difference in the Fixed TimeStep.

Check under Edit > Project Settings > Time to show the Time $$anonymous$$anager.

Unity defaults at 0.02, this is 50Hz. Now iOS runs at 60Hz, so you have to change the Fixed TimeStep to 0.0166667.

This is just a suggestion. Now I think, this would mean your objects rotate faster. The other thing to check is are you using deltaTime , fixedDeltaTime or smoothDeltaTime ? this is all I can think of, sorry.

avatar image Mz3D · Nov 13, 2012 at 10:14 AM 0
Share

I'm developing this game for android. Do you know if there's a standard hertz value for android os?

avatar image AlucardJay · Nov 13, 2012 at 10:34 AM 0
Share

Sorry , I have no information on Android. If the many screen resolutions are anything to go by, then with all the different CPU's there is probably no standard. I did a quick search, but maybe you should include a FPS display in your test build to deter$$anonymous$$e what your target device is running.

http://stackoverflow.com/questions/2265089/android-game-loop-how-to-control-speed-and-frame-rate

http://www.mysecretroom.com/www/program$$anonymous$$g-and-software/android-game-loops

http://answers.unity3d.com/questions/208094/how-to-change-framerate-for-android.html

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by tmdchi · Nov 13, 2012 at 10:30 AM

Are you multiplying your rotation value by Time.deltaTime? That should take care of any framerate difference between devices, and also adjusts itself depending where you use it (Update or FixedUpdate).

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 Mz3D · Nov 13, 2012 at 10:33 AM 0
Share

no i'm not because in this game there's a slide bar that changes dinamically the time.scale but i need the objects to keep rotating at the same speed ignoring the time scale so i just used a fixed float number, eg. "rotate(Vector3.up*0.5)"

avatar image tmdchi · Nov 13, 2012 at 10:38 AM 1
Share

If you want to ignore the timeScale in certain objects, then just multiply the rotation by (Time.deltaTime / Time.timeScale). Not using deltaTime will always have inconsistent results, such the ones you're having.

avatar image Mz3D · Nov 13, 2012 at 10:54 AM 0
Share

Thanks! dividing by Time.timeScale worked! now both the Unity game panel and the game on mobile have the same speed!

avatar image Wolfram · Nov 13, 2012 at 11:25 AM 0
Share

Unless you multiply your rotation by Time.deltaTime, it will be framerate dependent, so it will rotate generally much faster in the editor than on your device. Please read the documentation for Time.deltaTime.

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

12 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

Related Questions

A constant speed rotation finishing with a correct angle. 2 Answers

android game slower on pc than on mobile 3 Answers

Uniform rotation - uniform lerp 1 Answer

Accelerator.x rotating camera.z - problems with intermediate values 0 Answers

Adding speed to the rotation every second 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