Better FixedUpdate - problem

Hi everyone :slight_smile:

My problem is very simple but I can’t solve it. I want to have time execution order like this:

Update
Update
FixedUpdate
Update
Update
FixedUpdate
Update
Update
FixedUpdate
Update
Update
FixedUpdate

As you can see, between every FixedUpdate there are 2 Updates. The reason why I try to do it is that there is most phones which have a big problem with physics performance. My dream is to depented physics performace on FPS. Fast devices will have better physics and slower devices will have better framerate with physics on lower quality.

I try to do this by changing Fixed Timestep but the result isn’t the best:
Time.fixedDeltaTime = Time.deltaTime*2f;

Please, help me :wink:

i don’t think update fixedupdate order will give you any real benfit in performance (if any),
you really need to optimize your code and find what slows things down. try profiling your game.

unity physics on mobile is Not performance killer at all, especially if you increased Fixed Timestep in time settings.
you might find this helpful for you: sicklebrick.com is almost here!

Yeah, I know that physics isn’t a performance killer on most devices. In all but one of my devices, I have stable 60 FPS but on LG L5, the FPS is decreasing to about 25 FPS which isn’t optimistic for me.

are the other devices you tested (60fps ones) have similar hardware specs as the Lg L5?

try to set fixed timestep to 0.1 in time settings, and solver iteration count to 1 in physics settings.
this Will cause jittery animations if you have high fps, to solve this… use rigidbody interpolate to smooth physics animations for important objects.

sometimes many things in your game don’t need to interact with each other at all, use the physics settings page to uncheck layers that don’t need to interact with each other… for example i don’t make bullets colliders interact with other bullets colliders.

I’ve already know all of wrote by you tips. I need fixed timestep on about 0.03333 but for slower devices it will be about 0.06666. This is the minimum. Now I found a solution by using smoothdeltatime. Everythink work quite good with very small hitches - it’s better situation than before :wink:

And thank you for your reply ;p