- Home /
Dynamicaly scenario placement
Hi there!
I´m developing a game in which the ground is done by blocks of fixed size (20x1x40). There's always 4 blocks available in the scene: the actual, the next 2, the last one and, when the player reaches the end of the actual block, a new one is created (and the oldest is destroyed, remaining 4). Until here, everything works fine.
The point is that I have a list of scenario props of different kinds and sizes, and I want to, everytime a new block is created, some of those props is created on the top of it. A system that picks a random object, make a placement test (to avoid touching others), and put it correctly (with maybe 1 extra unit spacing on each axis, for safety). A var deals with how many should be created on each block, as the amount changes over time.
It seems easy to do, but in the end, all my tests went wrong. In one them, I tried using an object to "scan" the area before placing, but it didn't worked as well. The problem is that I need a fast solution, as the player is always moving forward and, if it takes longer to do, the prop placement will become visible, which I don't want to.
Does anyone can help me with this? Almost everything is done in the game to end sandboxing, that's the only missing thing yet. As I'm a game designer (doing everything by myself), I don't have such a pro knowledge of programming to solve this alone. Thanks!
Your answer
Follow this Question
Related Questions
Dynamic placement of AI 1 Answer
Lightmapped terrain no shadow from dynamic objects 0 Answers
Error trying to use ExpandoObject in Unity 2018.1 2 Answers
How to build a tilemap at runtime? 1 Answer