Search Unity

Subtractive objects?

Discussion in 'Scripting' started by mikelowefedex, Nov 15, 2020.

  1. mikelowefedex

    mikelowefedex

    Joined:
    Sep 29, 2020
    Posts:
    139
    Hello,
    I have a scenario where my player stands in a hallway of a building. To save rendering time, I only have the rooms the player stands next to, active, while the rooms that are far away get rendered under one single cube with a texture scale set to the amount of doors that are in the hallway, since the doors to each room are equally apart from each other. If the player stands far enough away from the doors, the doors that get rendered (on the single cube), appear to match the doors to all the rooms that are near to the player.

    Since everything in the hall is 'active' or 'deactive' depending on the triggers that the player stands in, the actual instantiations of rooms appear next to the player, while the other rooms get rendered on that one cube. The tough part of what I am trying to do, is that the 'far' cube that renders all the doors in the hallway, seems to 'overlap' the cube that activates next to the player, making it so that the player can't enter the room that is next to it (because the cube that renders the rest of the doors is in the way). What I want to do, is make 2 'far cubes' that render to the right and to the left of the cubes that activate next to the player, and the problem will be solved. How could I get 2 cubes from a single cube, based on what one cube 'chops', and then have the textures, rotations and scaling positions and offsets in tact? Thank you.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,726
    Can you take a few screencaps and use them to illustrate what you're doing and what you're trying to do?

    It is hard to visualize if this is even a technical issue or just a user interface design issue, or something else entirely.