height maps
parent
eafd6fc01e
commit
420dfc0edc
|
@ -109,24 +109,18 @@ GameLib.D3.World.prototype.step = function(
|
||||||
this.instance.step(fixedStep, dtStep, 3);
|
this.instance.step(fixedStep, dtStep, 3);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
var now = Date.now() / 1000.0;
|
||||||
// todo: figure out, why this call to internal step is more stable for trimesh collisions.....
|
//var now = null;
|
||||||
//this.instance.internalStep(timeStep);
|
|
||||||
//return;
|
|
||||||
//console.log("this should not be called.");
|
|
||||||
|
|
||||||
//var now = Date.now() / 1000;
|
|
||||||
var now = null;
|
|
||||||
if(!this.lastCallTime){
|
if(!this.lastCallTime){
|
||||||
// last call time not saved, cant guess elapsed time. Take a simple step.
|
// last call time not saved, cant guess elapsed time. Take a simple step.
|
||||||
this.instance.step(timeStep);
|
this.instance.step(fixedStep);
|
||||||
this.lastCallTime = now;
|
this.lastCallTime = now;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var timeSinceLastCall = now - this.lastCallTime;
|
var timeSinceLastCall = (now - this.lastCallTime);
|
||||||
|
|
||||||
this.instance.step(timeStep, timeSinceLastCall);
|
this.instance.step(fixedStep, timeSinceLastCall, 4);
|
||||||
|
|
||||||
this.lastCallTime = now;
|
this.lastCallTime = now;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue