| 267 | |
| 268 | |
| 269 | static math::Vec getSlumpPos(math::Vec pos1, math::Vec pos2) { |
| 270 | float dist = pos1.minus(pos2).norm(); |
| 271 | math::Vec avg = pos1.plus(pos2).div(2); |
| 272 | // Lower average point as distance increases |
| 273 | avg.y += (1.0 - settings::cableTension) * (150.0 + 1.0 * dist); |
| 274 | return avg; |
| 275 | } |
| 276 | |
| 277 | |
| 278 | void CableWidget::step() { |