Skip to content

Commit

Permalink
better asteroid instance names
Browse files Browse the repository at this point in the history
  • Loading branch information
BarthPaleologue committed Sep 15, 2024
1 parent 019b94b commit ba6bda7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ts/asteroidFields/asteroidPatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class AsteroidPatch {
for (let i = 0; i < this.batchSize; i++) {
if (this.nbInstances === this.positions.length) return;

const instance = Objects.ASTEROIDS[this.typeIndices[this.nbInstances]].createInstance(`instance${this.nbInstances}`);
const instance = Objects.ASTEROIDS[this.typeIndices[this.nbInstances]].createInstance(`${this.parent.name}_AsteroidInstance${this.nbInstances}`);
instance.position.copyFrom(this.positions[this.nbInstances]);
instance.rotationQuaternion = this.rotations[this.nbInstances];
instance.alwaysSelectAsActiveMesh = true;
Expand Down

0 comments on commit ba6bda7

Please sign in to comment.