Spawning in Items to the map
Author: Colyn Reed
Problem
For this week I worked on spawning items into the map when the player enters the level. The initial problem I ran into was that because our levels are procedual generated, I couldn't place them in manually. The first item I wanted to spawn in was some torches that are attached to the wall for lighting. The first issue I ran into was getting the correct number I wanted to spawn in and getting them to be attached to the wall.
Solution
The first thing i had to do was make the torch its own actor so I could call it to spawn on the map. The next thing I had to do was figure out how many I wanted to spawn based on the amount of walls where in each room, and I decided that dividing that number by 3 would give me the perfect amount for the map to look and feel like a dungeon. Next I had to get he trasform of the walls mesh so I could change the location of the torches position on the wall. Once I got the torches spawning, I needed to adjust the height and rotation of the torch once it was on the wall. Once I was able to figure how to spawn the torches in, I was able to start spawning in other items to the maps.




Comments
Post a Comment