#How would you run an entity with a delay compared with another entity?
8 messages · Page 1 of 1 (latest)
I would write a system that gathers the data needed for the delayed system and stores it in a buffer. Then your "delayed" system can pull the data out of the buffer from the frame 100ms ago instead of reading up-to-date data from the world
Since you're using FixedTimestep, it should be a constant number of frames that you could calculate ahead of time.
But in general you shouldn't use your system time, you should use Res<Time>, since it will give you exactly the same time if you are within the same frame
I'm not sure if Res<Time> works with fixed timestep though. I know some people were discussing that lately
I've used Res<Time> in a fixed time step, can confirm it works!