18 lines
444 B
Plaintext
18 lines
444 B
Plaintext
Differential = class("Differential")
|
|
|
|
function Differential:initialize(options)
|
|
options = options or {}
|
|
|
|
self.power = options.Power or 1
|
|
self.coast = options.Coast or 1
|
|
self.preload = options.Preload or 10
|
|
self.viscousCoeff = options.ViscousCoeff or 0.9
|
|
|
|
self._gearbox = options.Gearbox
|
|
self._leftWheel = options.LeftWheel
|
|
self._rightWheel = options.RightWheel
|
|
|
|
if self._gearbox then
|
|
self._gearbox:linkDiff(self)
|
|
end
|
|
end |