height maps
parent
144d62a8fe
commit
eafd6fc01e
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue