Gear Switcher (for Bikes) - user-grinch/ModelExtras GitHub Wiki
The gear lever animation system responds to vehicle gear changes by rotating the lever along the X-axis. You can implement this through two methods: using a specially named dummy or JSONC configuration.
-
📌 Create a dummy in your model with this naming pattern:
x_gearlever_<angle>
Where
<angle>
is the rotation value in degrees for the X-axis. -
✨ Example: For a gear lever that rotates 30 degrees, name the dummy
x_gearlever_30
.
- 📁 Create or update a JSONC file in the
ModelExtras/data
folder - 🏷️ Name the file after your model's numeric ID (e.g.,
522.jsonc
) or model name (e.g.,nrg500.jsonc
). - ✏️ Add this structure to your JSONC file:
{
"gearlever": {
"offset": 30.0
}
}
The gear lever will rotate based on the specified angle when changing gears:
For a vehicle with model ID 522 (NRG-500):
-
📋 Either:
- Add a dummy named
x_gearlever_30
to your model -
OR create/update
ModelExtras/data/522.jsonc
containing:{ "gearlever": { "offset": 30.0 } }
- Add a dummy named
-
🎮 When your vehicle changes gears, the gear lever will automatically rotate by the specified angle!