Search Unity

PROBUILDER - How to create trap door?

Discussion in 'World Building' started by Alien_J, Sep 2, 2019.

  1. Alien_J

    Alien_J

    Joined:
    May 29, 2019
    Posts:
    7
    Working with probuilder, things are coming along nicely. But it just dawned on me... What if i can't initiate trap doors with ProBuilder.

    There will be some switches randomly placed in the levels. And the trap doors will be placed directly infront of them. If the player chooses correct, they get rewarded. If they choose wrong, the trap doors open. All the the levels are proc gen.

    I can do it building with plain ole Unity, but is it possible with ProBuilder?


    Any help is greatly appreciated
     
    Last edited: Sep 2, 2019
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    4,067
    A trap door is just a regular wall door on its side. Find a tutorial on making a door with ProBuilder and then when you're comfortable doing it, flip it 90 degrees on its side and bam, you're done.

    Just like a wall door needs a wall opening, a trap door would need a floor opening.

    The main physics problem I can see is if the player's Rigidbody falls asleep while he's standing on the trapdoor, then trapdoor opens, he won't fall. But all you need to do is wake him up when doors are changing, and he will fall right through. Or the moment he goes to try to move, that wakes his Rigidbody up and he will fall.