I’m working on a structure in my game, currently known as the “upgrade tower”. I made a model that lights up differently based on the current quest progress and the tower type, and now I’m working on the first quest, which requires the player to find the 3 missing orbs scattered around the tower
It’s still a work in progress since I’m only on quest 1 out of 5, but I just finished implementing entirely random spawn locations for each orb, as opposed to choosing between a handful of predefined spawn points.
Instead of using pre-determined spawns, I made a small loop that continuously casts rays, searching for a valid location that’s far enough from the tower. I made a debug state that visualizes each ray, and also un-culls the invisible physics barriers, so you can see it trying to find a valid location
It’s not a great image, but here’s an arial view showing the Ray debug state for ‘hiding’ the 3 orbs at 2 different towers.
So far it’s been working surprisingly well to pick a valid location that the player can reach every time, so I’m excited to use this as my go-to way of hiding key items.