Terasology / Rails

Base rail module for minecarts and such
9 stars 17 forks source link

Custom friction coefficients for rails #27

Closed eviltak closed 6 years ago

eviltak commented 6 years ago

Closes #20.

Adds a new property frictionCoefficient to RailComponent with a default value of 0.1 which can be used to specify custom friction coefficients for different rail types. This property is used by CartMotionSystem to calculate the friction to be applied on a cart depending on the value of the friction coefficient of the RailComponent on which the cart currently is.

Testing

Change the default value of frictionCoefficient (or use a different type of rail with a different friction coefficient, your own or one from AdditionalRails) and notice a difference in the amount of friction force applied on a cart.