Skip to main content

Door And Hood Components

Door

The Door component is both a visual representation and handles the logic for players entering and exiting the vehicle. Below is an overview of the Door component's data:

Door Component Data

NameTypeDescription
Attachment DirectionEnumSpecifies the direction of the door attachment.
Door IndexIntIdentifies the door by index: FL = 0, FR = 1, BL = 2, BR = 3. Links seats to specific doors.
Target RotationRotatorSpecifies the door’s fully open rotation.
Invert Right DoorBoolMirrors the right door to avoid manually inverting the target rotation.
Attachment TypeEnumDefines the type of attachment.
Handle PositionVectorSpecifies the handle position. The interaction volume will spawn here. Visualized as a sphere in the 3D viewport for easy setup.

Door Animations

Each Door component uses two animation montages:

  • Left side montage
  • Right side montage

Each montage includes two sections:

  1. Enter animation
  2. Exit animation

The doors are linked to animations through a curve called CompAnim. This curve defines:

  • 0 = Door fully closed
  • 1 = Door fully open

CompAnim Curve

Additionally, each animation requires a notify at the midpoint of the CompAnim peak. This helps synchronize the animation with other gameplay elements.

Animation Notify


Hood and Trunks

Hoods and trunks follow similar rules to doors, with some key differences:

  • Attachment Enum Value: The enum value for hoods and trunks is unique compared to doors.
  • Target Rotation: Their target rotation typically aligns with their respective axis, often using Pitch.
  • Interaction Index: Hoods and trunks do not require an interaction index since they do not link to seats.