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