Page MenuHomeFeedback Tracker

Add a command to get the delta time between two frames
Acknowledged, WishlistPublic

Description

Currently we have many ways to make script execution happen on every frame, but there is no easy and clean way to actually get the time elapsed between two frames (commonly referred to as delta time).

Yes, there are possibilities, but they are all messy and the engine already has it's own delta time calculation that would only need to be exposed via a scripting command.

An example of such command could be simply

_deltaTime = deltaTime;

And be used in things like:

_object setVelocity [_x, _y, _z + (_za * deltaTime)];

Details

Legacy ID
1247564962
Severity
None
Resolution
Open
Reproducibility
N/A
Category
Scripting

Event Timeline

Sniperwolf572 edited Additional Information. (Show Details)
Sniperwolf572 set Category to Scripting.
Sniperwolf572 set Reproducibility to N/A.
Sniperwolf572 set Severity to None.
Sniperwolf572 set Resolution to Open.
Sniperwolf572 set Legacy ID to 1247564962.May 7 2016, 7:34 PM
Sniperwolf572 edited a custom field.

already possible using diag_tickTime and diag_frameno, and an each frame event handler

BIS_fnc_KK added a subscriber: BIS_fnc_KK.EditedJul 11 2019, 7:42 PM

A wise man once said, if you want a script command added to Arma, wait 5 years (not true)

Added diag_deltaTime