I was using Yoggy’s Car Physics on an iPhone project and have found the physics calculations dog the iPhone and frame rates drop to 15fps and sometimes less on an iPod touch 2nd generation. I’m pretty sure it’s the physics. Whenever the car goes airborne frames jump to a steady 30.
I believe the Mars Explorer App by robur uses Yoggy’s Physics as a basis and it appears to get 30fps.
Yoggy’s Car Physics can be found here.
http://forestjohnson.blogspot.com/2008/03/couple-old-example-projects.html
Looking for ideas to get frame rates up.
Have you tried increasing the time step in the project physics properties? A larger step will mean less precision but physics calculations should be faster.
Yes. I have it set as low as possible before the physics breaks down. I’m trying to see if there are ways to fine tune the code and make it run better.
Fun, fun… :roll:
Back when I replied to this post originally, I said yoggy’s physics wouldn’t work on iOS… now that iOS devices are wayyy faster I wouldn’t be at all surprised if you could use them without issue
Good luck!
Jeff.
Big Fun Racing uses Yoggy’s car physics. Not only that the raycasts hurt very much, you have to cache transforms and other variables that are used in the car and esp. in the wheel logic. Each tranform.position hurts a lot as Unity needs to do a lookup for the “transform”. Use a myTransform: Transform; as variable, set it in the Start() function and replace in the code all calls to transform by myTransform. Same for the other variables. That all (and other stuff) helped Big Fun Racing to work proper on the iPhone.
I do like Yoggy’s Car Physics better then using Wheel Colliders but I get 30 fps using wheel colliders vs. 15 or less with Yoggy’s. Using the code tweak from this thread,
http://forum.unity3d.com/viewtopic.php?t=24987
I get an extra 5-10 fps on wheel colliders and no increase in Yoggy’s.
I think I will stick to wheel colliders for now.