Clutch (for Bikes) - user-grinch/ModelExtras GitHub Wiki

423014584-f00585b7-84ab-4515-b252-7e6564037fd7

🚲 Overview

This feature animates the clutch when the bike changes gears, offering a more realistic riding experience. The clutch rotates along the Z-axis based on a specified rotation value. This animation adds dynamic behavior to the clutch during gear shifts, enhancing the immersion.

How It Works:

The clutch animation is controlled by either of the following methods:

  1. Node Naming Convention → A quick and straightforward approach (Basic method).
  2. JSONC Configuration → A more flexible and recommended method for advanced control.

🛠️ Method 1: Using Dummy Node Naming (Basic Setup)

To define the clutch's rotation, create a node in your model using the following naming pattern:

📌 Node Format:
x_clutch_<rotation_value>

📌 Example:

  • x_clutch_45 → The clutch rotates 45 degrees on the Z-axis when shifting gears.

This method works well for simpler setups but lacks flexibility. For more fine-tuned control, use Method 2 (JSONC).

🛠️ Method 2: Using JSONC Configuration (Recommended)

Instead of renaming nodes, you can configure the clutch animation via JSONC, providing more flexibility and ease of tuning.

📂 JSONC File Location & Structure

📌 Path: ModelExtras/data/<model_id>.jsonc
📌 Example File: ModelExtras/data/522.jsonc (for model ID 522)

Example JSONC Configuration

{
    "clutch": {
        "offset": 45.0
    }
}

Advantages of JSONC Configuration

Easier tuning → Adjust clutch rotation without altering the model files.
More control → Fine-tune clutch behavior across different bikes.
Flexible updates → Update settings dynamically without re-exporting the model.

🎮 Expected Behavior

In-game, the clutch will animate smoothly based on the gear shift, rotating along the Z-axis according to the defined value (e.g., 45°). This animation provides a more immersive experience, enhancing the bike's gear-shifting realism.

⚠️ **GitHub.com Fallback** ⚠️