Unique Conditions for Each Clone and Instance

Interesting project so played around a bit. Here’s my version of food removal https://www.babylonjs-playground.com/#2CHIX4#1

Also added predator removal using a metadata and a set time https://www.babylonjs-playground.com/#2CHIX4#2 see lines 73, 74 and 167 to 171 and 183

lines 73, 74 could just have been cloneB.lifeTimeRemaining = 60 * 1000; I believe the advantage of using metadata is that Babylon.js picks the metadata property up when the mesh is exported and serializes it.

2 Likes