cyclone-physics
cyclone-physics copied to clipboard
Wrong order?
https://github.com/idmillington/cyclone-physics/blob/faf5da184d6ed1a459ceb1e6c1dd272321ebc2d3/src/body.cpp#L175 https://github.com/idmillington/cyclone-physics/blob/faf5da184d6ed1a459ceb1e6c1dd272321ebc2d3/src/body.cpp#L176
Shouldn't we first multiply by a drag value (lines 175, 176) before calculating the new total velocity and rotation? The book (page 211) states that total rotation equals to:
R` = R * (damping)^t + At,
where R` - new total rotation, R - previous rotation, A - angular acceleration, t - delta time.
But now it looks more like:
R` = (R + At) * (damping)^t = R * (damping)^t + At * (damping)^t.