- Home /
Unity Physics Engine over Multi platform
Hello, Unity and Uniters.
I'm working on unity3d multiplayer game using physics engine. I'm using several sphere and mesh colliders and gravity options. I have worked on various physics engine settings and parameters to get realistic game playing. I'd like this game to be available on multi platforms. (If possible, iPhone/iPad, Android and Web version and so on).
The trouble I have been challenged to now is accuracy of the physics engine. I've tried to execute the app on iPhone/iPad and found that they're getting some different result whenever running. For example, Unity3D simulator and iPad shows different movement of the objects. And whenever I run the app on iPad they shows various movement of the objects. All the parameters are always the same.
If anyone have some experiences of working on similar app, please let me know the solution. I appreciate any of your advice or help.
Thanks.
Answer by Djazman · Jul 20, 2012 at 03:42 PM
Physics simulation will be noticeably different if fps of your platforms are different.
Thanks for your kind help. I didn't know that so far. Then, how can I get right result without affecting by fps? Or do you know any other best solution of this problem?
This answer is totally correct. After 3 weeks of going crazy when moving my game to Android, from Web Player, & trying to figure out why my character's limbs were literally flying around the sky at random times, I found that the physics went south, when the frame rate dropped. Above 18 fps, everything looks and acted fine. When dropping below 17 fps, all of a sudden the whole model (humanoid) was totally flying around the scene. Drove me nuts, but I had to reduce the number of trees, grass, lower the quality, so the lower-powered android devices could process the scene and keep the FPS above 18...
You need, in this case, to go to Time manager settings and adjust $$anonymous$$aximum Allowed Timestep. This figure is for dealing with low framerate situations.
As Physics is handled in Fixed Update the above will help alleviate the problem.
http://docs.unity3d.com/$$anonymous$$anual/class-Time$$anonymous$$anager.html