Quantcast
Channel: Questions in topic: "random spawn"
Viewing all articles
Browse latest Browse all 125

Spawning prefabs randomly on top of existing tiles

$
0
0
Good day everyone! I'm currently in the process of building a 2D Game, and as for my next step I'd like to randomly spawn collectable gems (prefabs) on top of my tiles for the player to collect. My tilemap is generated at runtime. I've tried various solutions however I can't seem to get it quite right. I know that I'm supposed to get the positions of the tiles and check whether the tile below is empty or not, however I'm not sure how to implement this, and I'd really appreciate the help! Thank you. :)

Viewing all articles
Browse latest Browse all 125

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>