Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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:
    41
    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:
    7,586
    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.
     
  3. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    720
    Yup, I might be misunderstanding ... but there shouldn't be a problem :) A ProBuilder object is just a standard mesh, nothing special except we let you edit it inside Unity :)
     
unityunity