MovingBlocks

Rails support different friction coefficients

At the moment there is a java file in rails called Constants with a value called FRICTION_COFF. It should be possible to define other rail segments with different amounts of friction.

The goal of this task is to add a friction coefficient value to the RailComponent and adding support for different friction factors for each segment. This task involves tweaking the CartMotionSystem and using the friction coefficient of the current rail segment that the cart is currently on rather then using a fixed coefficient for all segments.

Definition of 'Done'

  • Create a pull request against rails that implements additional friction coefficients
  • Create an example rail segment in Additional Rails that demonstrates this functionality

Where to start

  • Look under the constants file and see where FRICTION_COFF is referenced.
  • Implement a friction value into RailComponent with a default value of .1f
  • Change all instances of FRICTION_COFF to use the value from the RailComponent

See also

Task tags

  • content
  • java
  • games
  • feature
  • rails

Students who completed this task

eviltak

Task type

  • code Code
close

2017