height maps

beta.r3js.org
polygonboutique 2016-11-21 08:20:47 +01:00
parent 144d62a8fe
commit eafd6fc01e
3 changed files with 13 additions and 2 deletions

View File

@ -44,7 +44,7 @@ GameLib.D3.Game.prototype.update = function(
for(var w in scene.worlds) {
var world = scene.worlds[w];
// NOTE: We are calling the step function with a variable timestep!
world.step(dt);
world.step(fixedDt, dt);
}
scene.update(dt);

View File

@ -66,6 +66,12 @@ GameLib.D3.Vector3.prototype.copy = function () {
);
};
GameLib.D3.Vector3.prototype.set = function (x, y, z) {
this.x = x;
this.y = y;
this.z = z;
};
GameLib.D3.Vector3.prototype.lerp = function ( v, alpha ) {
return new GameLib.D3.Vector3(
this.x + ( v.x - this.x ) * alpha,

View File

@ -103,8 +103,13 @@ GameLib.D3.World.prototype.addVehicle = function(
};
GameLib.D3.World.prototype.step = function(
timeStep
fixedStep,
dtStep
) {
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;