Fix enemy facing direction and add player damage feedback

This commit is contained in:
2026-08-19 07:42:13 +02:00
parent 3fde0925c5
commit fd57ca9740
10 changed files with 169 additions and 33 deletions
+4 -4
View File
@@ -28,15 +28,15 @@ export class Bat extends Enemy {
this.registerFadeMesh(bodyMesh);
this.model.add(bodyMesh);
// Head with ears (face toward the player: -Z)
// Head with ears (face toward the player: +Z)
const head = new THREE.Mesh(new THREE.SphereGeometry(0.18, 12, 10), furMat);
head.position.set(0, 0.15, -0.3);
head.position.set(0, 0.15, 0.3);
this.registerFadeMesh(head);
this.model.add(head);
for (const side of [-1, 1]) {
const ear = new THREE.Mesh(new THREE.ConeGeometry(0.07, 0.18, 6), furMat);
ear.position.set(side * 0.12, 0.32, -0.25);
ear.position.set(side * 0.12, 0.32, 0.25);
this.registerFadeMesh(ear);
this.model.add(ear);
}
@@ -45,7 +45,7 @@ export class Bat extends Enemy {
const eyeMat = new THREE.MeshToonMaterial({ color: 0xff2222 });
for (const side of [-1, 1]) {
const eye = new THREE.Mesh(new THREE.SphereGeometry(0.035, 8, 8), eyeMat);
eye.position.set(side * 0.07, 0.16, -0.42);
eye.position.set(side * 0.07, 0.16, 0.42);
this.registerFadeMesh(eye);
this.model.add(eye);
}