From 8f8b7187ef74994093318645e5e96b11d982688a Mon Sep 17 00:00:00 2001 From: Vincent Fretin Date: Mon, 30 Oct 2023 21:07:41 +0100 Subject: [PATCH] Reverse back wheels in webgl_demo_vehicle (#425) * Remove unused variables in webgl_demo_vehicle/index.html * Reverse wheels BACK_LEFT and BACK_RIGHT, the x coordinate was wrong --- examples/webgl_demo_vehicle/index.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/webgl_demo_vehicle/index.html b/examples/webgl_demo_vehicle/index.html index bd3e5b65b..3edf51d6e 100644 --- a/examples/webgl_demo_vehicle/index.html +++ b/examples/webgl_demo_vehicle/index.html @@ -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; @@ -78,9 +77,6 @@ var syncList = []; var time = 0; - var objectTimePeriod = 3; - var timeNextSpawn = time + objectTimePeriod; - var maxNumObjects = 30; // Keybord actions var actions = {}; @@ -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) {