Skip to content

Commit

Permalink
Reverse back wheels in webgl_demo_vehicle (#425)
Browse files Browse the repository at this point in the history
* Remove unused variables in webgl_demo_vehicle/index.html
* Reverse wheels BACK_LEFT and BACK_RIGHT, the x coordinate was wrong
  • Loading branch information
vincentfretin authored Oct 30, 2023
1 parent 1a601e4 commit 8f8b718
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions examples/webgl_demo_vehicle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
// Graphics variables
var container, stats, speedometer;
var camera, controls, scene, renderer;
var terrainMesh, texture;
var clock = new THREE.Clock();
var materialDynamic, materialStatic, materialInteractive;

Expand All @@ -78,9 +77,6 @@

var syncList = [];
var time = 0;
var objectTimePeriod = 3;
var timeNextSpawn = time + objectTimePeriod;
var maxNumObjects = 30;

// Keybord actions
var actions = {};
Expand Down Expand Up @@ -339,8 +335,8 @@

addWheel(true, new Ammo.btVector3(wheelHalfTrackFront, wheelAxisHeightFront, wheelAxisFrontPosition), wheelRadiusFront, wheelWidthFront, FRONT_LEFT);
addWheel(true, new Ammo.btVector3(-wheelHalfTrackFront, wheelAxisHeightFront, wheelAxisFrontPosition), wheelRadiusFront, wheelWidthFront, FRONT_RIGHT);
addWheel(false, new Ammo.btVector3(-wheelHalfTrackBack, wheelAxisHeightBack, wheelAxisPositionBack), wheelRadiusBack, wheelWidthBack, BACK_LEFT);
addWheel(false, new Ammo.btVector3(wheelHalfTrackBack, wheelAxisHeightBack, wheelAxisPositionBack), wheelRadiusBack, wheelWidthBack, BACK_RIGHT);
addWheel(false, new Ammo.btVector3(wheelHalfTrackBack, wheelAxisHeightBack, wheelAxisPositionBack), wheelRadiusBack, wheelWidthBack, BACK_LEFT);
addWheel(false, new Ammo.btVector3(-wheelHalfTrackBack, wheelAxisHeightBack, wheelAxisPositionBack), wheelRadiusBack, wheelWidthBack, BACK_RIGHT);

// Sync keybord actions and physics and graphics
function sync(dt) {
Expand Down

0 comments on commit 8f8b718

Please sign in to comment.