Link del tempo all'aggiornamento dei dati
This commit is contained in:
@@ -87,7 +87,7 @@ void rigidbody::calcPos(const float Dtime){
|
||||
|
||||
void rigidbody::step(const sf::Clock time, float multiplier){
|
||||
int64_t Dtime = time.getElapsedTime().asMicroseconds();
|
||||
if (prevT == 0) prevT = Dtime;
|
||||
if (prevT == 0) prevT >= Dtime;
|
||||
|
||||
|
||||
float dt = ((float(Dtime) / 1000000.0) - (float(prevT) / 1000000.0)) * multiplier;
|
||||
|
||||
Reference in New Issue
Block a user