Fix enemy facing direction and add player damage feedback
This commit is contained in:
+4
-4
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user