Browse Source

fix car position

Gregg Tavares 6 years ago
parent
commit
3d20c13236

+ 0 - 1
threejs/threejs-load-gltf-animated-cars.html

@@ -183,7 +183,6 @@ function main() {
       for (const car of loadedCars.children.slice()) {
         const fix = fixes.find(fix => car.name.startsWith(fix.prefix));
         const obj = new THREE.Object3D();
-        car.getWorldPosition(obj.position);
         car.position.set(0, fix.y, 0);
         car.rotation.set(...fix.rot);
         obj.add(car);

+ 0 - 1
threejs/threejs-load-gltf-shadows.html

@@ -309,7 +309,6 @@ function main() {
         const obj = new THREE.Object3D();
         car.position.set(0, fix.y, 0);
         car.rotation.set(...fix.rot);
-        car.scale.set(1, 1, 1);
         obj.add(car);
         scene.add(obj);
         cars.push(obj);