I’m working on a project using DOTS, and I’m using a single VFX graph instance to draw all of the bullet positions to save on CPU. I’m passing a position, rotation, and speed to the VFX graph on spawn, and I send an event from a fixed time ECS system to update the VFX graph. I’ve made sure that “Fixed Delta Time” is checked on the VFX graph asset, and I’ve synchronized the timestep in the VFX project settings with the DOTS fixed timestep (60 FPS or .01666~).
This works great and the bullets are perfectly in sync as long as the framerate is stable. It appears, however, that the VFX graph does not always use that timestep when the event is called from the DOTS system if the framerate is unstable, and if a DOTS fixed update takes longer than its 16ms then the VFX graph doesn’t care and will simulate whatever the actual difference was.
That may not be correct, but if I drop the VFX max timestep to .0166~ then it gets significantly better, but still desyncs noticeably when the framerate gets unstable.
Is there a good way to synchronize VFX graphs to the DOTS fixed timestep so that they will always be in sync? Thanks in advance!
