height maps

beta.r3js.org
polygonboutique 2016-11-21 08:40:43 +01:00
parent eafd6fc01e
commit 420dfc0edc
1 changed files with 5 additions and 11 deletions

View File

@ -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;
};