The method for determining the frame's timestep or deltatime in an MTKView is to subtract the current timestamp from the previous timestamp. The timestamps can be obtained from the timestamp property of the MTKView's currentRenderPass descriptor. The resulting value is the time elapsed since the previous frame and can be used to update the game logic or animation.
Asked: 2023-05-16 13:36:03 +0000
Seen: 10 times
Last updated: May 16 '23