Spaces:
Running
Running
Update game.js
Browse files
game.js
CHANGED
@@ -590,9 +590,17 @@ class Fighter {
|
|
590 |
|
591 |
// ๋ฉ์ ์์น ๋ฐ ํ์ ์
๋ฐ์ดํธ
|
592 |
this.mesh.position.copy(this.position);
|
593 |
-
|
594 |
-
|
595 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
|
597 |
// ๊ฒฝ๊ณ ๊น๋นก์ ํ์ด๋จธ
|
598 |
this.warningBlinkTimer += deltaTime;
|
|
|
590 |
|
591 |
// ๋ฉ์ ์์น ๋ฐ ํ์ ์
๋ฐ์ดํธ
|
592 |
this.mesh.position.copy(this.position);
|
593 |
+
|
594 |
+
// ์ง๋ฒ ๋ฝ์ ํผํ๊ธฐ ์ํด ์ฟผํฐ๋์ธ์ผ๋ก ํ์ ์ ์ฉ
|
595 |
+
const tempQuaternion = new THREE.Quaternion();
|
596 |
+
const rotationEuler = new THREE.Euler(
|
597 |
+
this.rotation.x,
|
598 |
+
this.rotation.y + 3 * Math.PI / 2,
|
599 |
+
this.rotation.z,
|
600 |
+
'YXZ' // ์ค์ผ๋ฌ ์์ ๋ณ๊ฒฝ์ผ๋ก ์ง๋ฒ ๋ฝ ๋ฐฉ์ง
|
601 |
+
);
|
602 |
+
tempQuaternion.setFromEuler(rotationEuler);
|
603 |
+
this.mesh.quaternion.copy(tempQuaternion);
|
604 |
|
605 |
// ๊ฒฝ๊ณ ๊น๋นก์ ํ์ด๋จธ
|
606 |
this.warningBlinkTimer += deltaTime;
|