Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Pro Builder Sliding Doors Animation

Discussion in 'World Building' started by CoreCoder, Oct 1, 2018.

  1. CoreCoder

    CoreCoder

    Joined:
    Jun 11, 2015
    Posts:
    41
    So this is really weird. I created in Pro Builder a door frame and 2 doors. Animated everything to a OnTriggerEnter works fine, when you select the door in SCENE view while playing the door mesh opens but the material "Glass" that was added to the pro builder element will not move? If I disable the code for the trigger the doors wont open as expected. When I enable the code doors operate as normal leting characted enter/exit on open trigger but the material will not move so looks like the doors are closed in game but ofcause you can walk through them as the material does not have a collider. What can be wrong? Does Pro Builder not allow to move there structures / meshes while in game play?
     
  2. CoreCoder

    CoreCoder

    Joined:
    Jun 11, 2015
    Posts:
    41
    NM I answered my own question.
    To be able to have a object move under Pro Builder, PB actually marks all objects with the STATIC flag. Just removed the static flag and worked fine. Feel a little bit dumb but practice makes perfect :)
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,520
    Good catch. Been bitten this way before.

    I am not 100% sure but I think you can leave almost all the static sub-flags on except Batching Static, such that you can still have your doors lit and all.
     
    gabrielw_unity likes this.
  4. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Hey! Yep, PB objects use "STATIC" by default (since PB stuff is generally just walls, floors, etc, non-moving things). You can change this default (and much, much more!) in the PB preferences (Edit > Preferences > ProBuilder) :)
     
    Kurt-Dekker likes this.
  5. twistidklown

    twistidklown

    Joined:
    Sep 23, 2018
    Posts:
    1
    Also to make multiple objects move together is to make them the children of the object that the animation is attached to.