DeltaTime, where you at?πŸ˜•


#1

Does Xenko have a delta time variable to scale for frame rate?


#2

From within script you use Game.UpdateTime.Elapsed which will give you a TimeSpan of the β€œdelta time”. You would most likely use TotalSeconds to do your math. i.e.:

Vector3 heading; //Some normalized direction
float walkSpeed = 1.5; //m/s

var movement = heading * walkSpeed * (float)Game.UpdateTime.Elapsed.TotalSeconds;