Create Double Doors
Door System truly shines when creating Double Doors.
What are Double Doors?
Double Doors are paired doors with synchronized states and animations. They exhibit specific behavior involving:
Inverted rotation on certain axes
Inverted Hinge position
Inverted Translation movement
Perfect alignment
Shared Detection Area
Double Rotating Doors
Create a SmartDoor
Begin by creating a Smart Door following the steps outlined in the Create a Simple Door guide.
Create a Second SmartDoor
The easiest method is to duplicate the first door, though you can recreate one from scratch if desired.
If flipping is necessary, select the Child GameObject and rotate it around the Y-axis by 180 degrees. After this, the Hinge will have a misaligned rotation but you'll be able to correct it with the "Hinge Rotation" field (on the master door, after pairing).
Pair the Doors
Select the Right-Handled Door (random selection is fine, but maintain consistency).
In the “Pairing Section,” drag and drop the other SmartDoor into the “Paired Door” field.
By doing this, you pair the second door to the first. Let’s refer to the first as the “Master Door” and the second as the “Paired Door.” When a door becomes a “Paired Door,” its Hinge position automatically changes to match the inverted position of the Master Door. Certain sections are disabled since they’re controlled by the Master Door, depending on your settings.
Alignment is still needed. With the Master Door selected, go to the “Pairing” Section and click on one of the alignment buttons.
For the purpose of this guide, align the doors horizontally.
Adjust the opening angle to your needs and validate it by clicking on “Use Open Angle as open”.
Now, if you preview the Close and Open Position, Master Door and Paired Door should behave as intended.
Double Sliding Doors
Sliding doors are even easier!
Once you have paired your door, go to the Motion Section and select “Move” instead of “Rotation”. By default, the current world position is used as Close Position.
Click on Invert for Paired Door to have inverted translation for the Paired Door. Now you can move your SmartDoor (the parent, not the child) to the desired Open Position. Usually, you want to move it along its Local X-Axis.
Once you’re satisfied with your Open Position, validate it by clicking on “Use Position as Open” that should be green.
Now, if you preview the Close and Open Position, Master Door and Paired Door should behave as intended.
Last updated
Was this helpful?