chore: half sweeping angle

pull/161/head
Allison Ryan 4 years ago
parent 5cce9831fe
commit b63167d869

@ -196,8 +196,8 @@ class _FlipperJoint extends RevoluteJoint {
lock(); lock();
} }
/// The total angle of the arc motion. /// Half the angle of the arc motion.
static const _sweepingAngle = 1.222; static const _halfSweepingAngle = 0.611;
final BoardSide side; final BoardSide side;
@ -206,7 +206,7 @@ class _FlipperJoint extends RevoluteJoint {
/// The joint is locked when initialized in order to force the [Flipper] /// The joint is locked when initialized in order to force the [Flipper]
/// at its resting position. /// at its resting position.
void lock() { void lock() {
const angle = _sweepingAngle / 2; const angle = _halfSweepingAngle;
setLimits( setLimits(
-angle * side.direction, -angle * side.direction,
-angle * side.direction, -angle * side.direction,
@ -215,7 +215,7 @@ class _FlipperJoint extends RevoluteJoint {
/// Unlocks the [Flipper] from its resting position. /// Unlocks the [Flipper] from its resting position.
void unlock() { void unlock() {
const angle = _sweepingAngle / 2; const angle = _halfSweepingAngle;
setLimits(-angle, angle); setLimits(-angle, angle);
} }
} }

Loading…
Cancel
Save