Search Unity

Question How can I make such a thing?

Discussion in 'Scripting' started by LazyGhost15, May 9, 2023.

Thread Status:
Not open for further replies.
  1. LazyGhost15

    LazyGhost15

    Joined:
    Feb 12, 2022
    Posts:
    120
    I want to make a system that goes to each tile in my grid. checks for data that the tile store (like floats and bools) and then put objects on the tile using the data.
    I want to use that to create a 3D map so for example:
    the script goes to tile in x18 y0 and z23 and searches for height and block-type floats. the in found that the height float is 17 and the block type is 3. Then it put 17 blocks of type 3 on top of each other.
    How can I make such a system using Unity?
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    would it basically look something like this?
    - each x and z coordinate, in the grid, have certain height (but no empty gaps in those tall areas)
     
  3. LazyGhost15

    LazyGhost15

    Joined:
    Feb 12, 2022
    Posts:
    120
    I think it would look pretty similar at least after the placement of blocks, depending on the tiles. I just want Unity to get data from the tiles and put above it cubes like in this picture. ofc to do such a thing the tile need to hold the height float and the type float. The idea is to use a 2D grid to make a 3D world
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
  5. LazyGhost15

    LazyGhost15

    Joined:
    Feb 12, 2022
    Posts:
    120

    I'll use the tutorial because I want to understand each step in the process but in the tutorial, He talks about "POCO model for tiles"? what is exactly a poco model for tiles?
     
  6. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    oh interesting, haven't heard that before,
    https://stackoverflow.com/a/250006
     
Thread Status:
Not open for further replies.