I'm working on a project where I need something to move -exactly- in time with the refresh rate of the screen (in my case, 60hz). vBlank gets really close to this, but there is a little drift, and this severely harms the look of my project. I have also tried syncing the motion with the "Time.frameCount", but that also leads to the same drift.
I have set the render settings to use vBlanks on single intervals (ie, 60hz), but it appears that it gets slightly out of sync when it cant completely render a frame. The object I'm displaying is just a cube in blank space, so it should render as fast as possible.
How about this- change the Fixed-update time to be exactly 1/60 of a second, then in your Fixed Update render the camera manually using Camera.Render, to make sure that all the frames fall on the exact right times. Make sure that you disable the camera before doing this, since you will be manually managing all the camera work yourself. Pseudocode (mostly C#)-
Have you tried doing the rendering manually? I think that is the solution to your problem, there.
answered Oct 23 '11 at 08:15 AM