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
Name | Type | Description |
---|---|---|
Attachment Direction | Enum | Specifies the direction of the door attachment. |
Door Index | Int | Identifies the door by index: FL = 0, FR = 1, BL = 2, BR = 3. Links seats to specific doors. |
Target Rotation | Rotator | Specifies the door’s fully open rotation. |
Invert Right Door | Bool | Mirrors the right door to avoid manually inverting the target rotation. |
Attachment Type | Enum | Defines the type of attachment. |
Handle Position | Vector | Specifies 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:
- Enter animation
- Exit animation
The doors are linked to animations through a curve called CompAnim
. This curve defines:
- 0 = Door fully closed
- 1 = Door fully open
Additionally, each animation requires a notify at the midpoint of the CompAnim
peak. This helps synchronize the animation with other gameplay elements.
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.