Door System
  • 🏠Door System
  • General
    • 🚀Getting Started
      • Create Simple Door
      • Create Double Doors
    • ❔FAQ
    • ⛑️Troubleshooting
    • 👥Support
  • Advanced
    • Migration Tool
    • 📖Components
      • SmartDoor
      • SmartKeyHolder
      • SmartKey
    • 🔎Glossary
Powered by GitBook
On this page
  • Prepare your GameObject
  • Configure your SmartDoor

Was this helpful?

  1. General
  2. Getting Started

Create Simple Door

PreviousGetting StartedNextCreate Double Doors

Last updated 1 year ago

Was this helpful?

Prepare your GameObject

To use Door System, you just have to add a SmartDoor Component on your GameObject. But you still have to respect the following contraints, required by design:

  1. Create an Empty Object as Parent of your Door

  2. Add SmartDoor component onto the Parent

  3. Parent must have uniform scaling (1,1,1), (2,2,2), (3,3,3), etc...

Here is what you should have now:

Configure your SmartDoor

Once you have both, SmartDoor GameObject and its child, you can start configuring it.

Hinge Positioning

Important Note: DoorSystem relies on the GameObject's local forward direction to determine right and left.

In the process of setting up your door, you may encounter issues with the Hinge position, as illustrated below:

To correct the Hinge position, follow these steps:

After adjusting, you might find yourself in one of the following situations:

  1. If the Hinge position is perfect, go to "Motion" step.

  2. If the Hinge position is not ideal, follow the next steps.

Fine-Tuning the Hinge Position:

  1. Adjust Hinge Offset:

    • If your door had a well-positioned Pivot Point, you can restore it by clicking the "GFX Pivot Point" button instead of adjusting the offset.

  2. Recalculate Detection Area:

By following these steps, you can ensure that the Hinge is correctly positioned, leading to smooth door animations and functionality.

Motion

Why Use Negative Values for Left-Handled Doors?

When defining the Open Angle, it's crucial to open the door in the Local Forward direction. This orientation assists Door System in correctly aligning the door based on the player's position. Special considerations may apply based on specific needs.

To set the appropriate Open Angle:

  1. Adjust the Open Angle to 90 degrees for Left-Handled Doors.

  2. Click on "Use Open Angle as Open" to save your new angle.

Detection Area Configuration

By default, the Detection Area detects all GameObjects that enter. To filter them, utilize the "Layer Mask" or enable "Use Tag Mask."

Follow these steps:

  1. Enable "Use Tag Mask" and select a Tag exclusively assigned to your Player.

  2. Enable "Open On Detect" to allow the door to open upon detecting a GameObject with the specified Tag.

  3. Click on "Calculate Detection Area" to finalize the settings.

Now, enter Play mode and move your character close to the door. You should observe the door magically opening in the Player's forward direction!

Click on the "Bottom Right" button in the to adjust the Hinge position:

Still in the , modify the "Hinge Offset" until the pivot point aligns perfectly with your door.

After changing the Hinge position, remember to recalculate the for accurate functionality.

By default, Door System opens doors with an angle of -90 degrees, which is suitable for . However, for , an angle of 90 degrees is recommended.

🚀
Right-Handled doors
Left-Handled doors
SmartDoor and its child
Hinge positioning
Open door in forwar direction
Hinge section
Hinge Section
Detection Area