Skip to content
We are updating the documentation, some information may be outdated or incomplete

WheelInfo

This page will teach you how to add wheels to your cars, motorcycles, and other trailers.

Prerequisites

You must have configured your first land vehicle.

Wheel Configuration

For each type of wheel present on your vehicle, create a file wheel_your_wheel.dynx (preferably in the same folder as your vehicle).

The default wheel name to be indicated in the vehicle configuration will be AttachedWheel: YourPack.your_wheel.

Warning

To be recognized, the file name must start with "wheel_"!

Here are the different properties to fill in:

The recommended values are given as indicative, but you will need to test for hours to achieve good handling.

Required Properties
Name Type Description Example
BrakeForce Decimal number Braking Power. Recommended value: 1000. -
Friction Decimal number Wheel Grip. Recommended value: 1.5. -
Model ResourceLocation: path to a resource in the format modid:folder/resource. For example, with dynamxmod:model1/model1.obj, the model should be in assets/dynamxmod/models/model1/model1.obj Model Path OBJ obj/nom_du_vehicule/nom_du_modele.obj
Radius Decimal number Wheel Radius. To determine it, create a cylinder that encloses the wheel; this is the radius of that cylinder -
RimRadius Decimal number Rim Radius. To determine it, create a cylinder that encloses the rim; this is the radius of that cylinder (used for the puncture system) -
RollInInfluence Decimal number Influence of the suspension on the rotation around the Z-axis (roll) of the vehicle. Recommended value: 1, modifying it is tricky. -
SuspensionMaxForce Decimal number Maximum force applied to the suspension before it breaks (in Newtons). Recommended value: 10000 (too small a value will break everything). -
SuspensionRestLength Decimal number Suspension Maximum Length (in centimeters). Recommended values: 0.03 to 0.5 (low or high vehicle). -
SuspensionStiffness Decimal number Suspension Stiffness (affects its rest length). Recommended values: from 30 to 60. -
WheelDampingRelaxation Decimal number Relaxation coefficient, the lower the value, the faster the wheel returns to its rest length after compression. Recommended value: 0.45. -
WheelsDampingCompression Decimal number Compression coefficient, the lower the value, the faster the wheel returns to its rest length after rebound. Recommended value: 0.22. -
Width Decimal number Wheel Width. To determine it, create a cylinder that encloses the wheel; this is the width of that cylinder. -
Optional Properties
Name Type Description Default Value
HandBrakeForce Decimal number Handbrake braking power 2*BrakeForce
ScaleModifier Vector with 3 axes (X, Y, Z) Allows modifying the size of the wheel model, other parameters such as radius and width will be automatically recalculated. The vehicle's scale should be configured in the vehicle config directly, see above. -
SkidParticle Particle type (see the list of particles on the Minecraft wiki) Particle emitted at the wheel when it slides, can be any Minecraft particle, its name must be specified, the default value is smoke -
Textures List of strings accepting values in pairs (e.g., Value1 Value2, Value3 Value4, ...) Deprecated. See multi-texture configuration. "Textures: DynamX"

Tip

The same wheel can be used on multiple vehicles!

Tip

Suspension can be tedious to configure because many of these properties influence each other, so be patient and vigilant! You can also copy recommended values or those from existing packs...

Info

The configuration of the wheel's width and radius may be simplified in the future.

Making a Motorcycle

To make a motorcycle, add two wheels on the sides, making them invisible by setting Model: disable_rendering in their config, placing them slightly above the ground, and not applying any braking force. After that, it's quite time-consuming to balance, just like the suspensions... Make sure to place the center of gravity slightly above 0 for a realistic motorcycle behavior.

Conclusion

Congratulations, if you've done everything in order, you've just put your first car into the game! If you have any further questions, visit the DynamX Discord! You can also add functional doors and headlights to it.