I can’t figure out how to make the black overlay’s scale smaller each time it hits an object, Voidon. Here’s a link to my scene.
I’m not sure about this code, but is this correct? And, how do I implement this?
entity.setLocalScale(0.9, 0.9, 0.9);
The part of the code with collision.
HeroMovement.prototype.onCollisionStart = function(assets) {
if(assets.other.name == "gas"){ //assets - other assets in the map
assets.other.destroy();
}
if(assets.other.name == "Voidon"){
assets.other.destroy();
}
};