Gate Animation
Overview
Before the player begins moving out of the starting zone (base), an animation plays to open a gate, barrier, or other obstacle. This behavior is handled by the DoorControl component.

DoorControl component settings:
Open and close animation A reference to the animation clip (Animation or Animator) that plays when the component is triggered.
Activation object tag Defines which objects the system responds to (e.g., Player). The component is triggered when an object with the specified tag enters the activation zone.
Adding the gate model
To add your own gate model to the scene, you need to prepare the following elements:
Gate opening and closing animations Prepare two animation clips:
Opening animation (e.g.,
GateOpen)Closing animation (e.g.,
GateClose)
Trigger objects:
OpenTriggerandCloseTriggerThese are two separate objects with a Collider component (usually aBoxCollider) set to isTrigger = true. They determine when the gate should open or close.Layer:
DoorBoth trigger objects (OpenTriggerandCloseTrigger) must be assigned to the Door layer. This is required for proper collision filtering and activation logic.

Last updated