Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
joost.vrbeelding's avatar
1 year ago

Unlock fixedDeltaTime and maximumParticleDeltaTimefrom framerate

I am trying to create a trail for a fast-moving object (a baseball).

My first attempt was to instantiate a mesh every fixedUpdate, but I found out that this was not detailed enough. So I increased the physics update rate by decreasing Time.fixedDeltaTime. Unfortunately this did not work. After some troubleshooting I figured out that the fixedUpdate was called approximately 72 times per second, even after changing it to 200 times per second. Which is exactly the same as the refresh rate of the Meta Quest

My second option was to use particles and set the MaxParticleTime to 0.005 (200 times per second). But again, it is set back to 72 times per second as soon as I run the app. Even when I include an option to change it at runtime using the thumbstick it never changes from 0.01388889 (72 Hz)

How can I unlock the physics or particle update rate from the frame rate?
There is no reason to link these two. It should be perfectly fine to run 2 or 3 Unity FixedUpdate cycles in one Quest frame cycle. Of course, if you set it too high the physics will take too much time and the image will stutter. But that is the same if you have meshes with too many tris in your scene. That's up to the developer to control.