I am researching Interaction Latency - the delay between pressing a key and seeing the result on screen.
I have my Unity3D application deployed remotely to an EC2 instance on AWS. I have another application, on the client, sending keyboard and mouse events to the server Unity3D application.
My goal is to measure the time between pressing a key or moving the mouse on the client and having the corresponding image displayed (on the client!). A GUID is sent from the client to the server and when the image comes back, it has the GUID that supposedly matches the command which generated the command which calls
ReadPixels (yes, I know
RenderTarget is faster, but I do not have the Pro license, yet).
My system works well, but I am concerned that the frame that the client receives (and which I measure against), is not the result of key that was pressed. The reason for this is because Unity3D renders, regardless of whether or not it received a command from the client application.
I'd like to only render if a key press is received from the client.
How can I do this? Any suggestions on how to measure the delay between the client key press and the updated image on the client is also welcome.