cutechicken commited on
Commit
e43a395
โ€ข
1 Parent(s): 3bb416a

Update game.js

Browse files
Files changed (1) hide show
  1. game.js +3 -3
game.js CHANGED
@@ -1253,8 +1253,8 @@ class Game {
1253
  const tankPos = this.tank.getPosition();
1254
 
1255
  // ์นด๋ฉ”๋ผ๋Š” ๋งˆ์šฐ์Šค X ํšŒ์ „์—๋งŒ ๋”ฐ๋ผ๊ฐ
1256
- const cameraDistance = 30;
1257
- const cameraHeight = 15;
1258
  const cameraAngle = this.mouse.x + Math.PI; // ํ•ญ์ƒ ํฌํƒ‘์˜ ๋’ค์ชฝ์— ์œ„์น˜
1259
 
1260
  const cameraX = tankPos.x + Math.sin(cameraAngle) * cameraDistance;
@@ -1269,7 +1269,7 @@ class Game {
1269
  // ์นด๋ฉ”๋ผ๊ฐ€ ํƒฑํฌ๋ฅผ ๋ฐ”๋ผ๋ณด๋„๋ก ์„ค์ •
1270
  const lookAtPoint = new THREE.Vector3(
1271
  tankPos.x,
1272
- tankPos.y + 2,
1273
  tankPos.z
1274
  );
1275
  this.camera.lookAt(lookAtPoint);
 
1253
  const tankPos = this.tank.getPosition();
1254
 
1255
  // ์นด๋ฉ”๋ผ๋Š” ๋งˆ์šฐ์Šค X ํšŒ์ „์—๋งŒ ๋”ฐ๋ผ๊ฐ
1256
+ const cameraDistance = 15;
1257
+ const cameraHeight = 8;
1258
  const cameraAngle = this.mouse.x + Math.PI; // ํ•ญ์ƒ ํฌํƒ‘์˜ ๋’ค์ชฝ์— ์œ„์น˜
1259
 
1260
  const cameraX = tankPos.x + Math.sin(cameraAngle) * cameraDistance;
 
1269
  // ์นด๋ฉ”๋ผ๊ฐ€ ํƒฑํฌ๋ฅผ ๋ฐ”๋ผ๋ณด๋„๋ก ์„ค์ •
1270
  const lookAtPoint = new THREE.Vector3(
1271
  tankPos.x,
1272
+ tankPos.y + 1,
1273
  tankPos.z
1274
  );
1275
  this.camera.lookAt(lookAtPoint);