Skip to content

Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.

NumDrive: a joint's angle rows before its position rows, as in Bullet

Mason363da07ee24d865
diff --git a/games/numdrive/src/physics.c b/games/numdrive/src/physics.c
index a12c45db..632423c2 100644
--- a/games/numdrive/src/physics.c
+++ b/games/numdrive/src/physics.c
@@ -1901,7 +1901,12 @@ static void solve_joints(bool first) {
if (e < j->lo[k]) jt->pass |= 1 << k;
if (e > j->hi[k]) jt->pass |= 8 << k;
}
- for (int k = 0; k < 3; k++) {
+ /* the angle first, then x and y, as Bullet's 6DofSpring2 orders a joint's rows ("for stability better to
+ solve angular limits first"). Solved last, a joint's angle limit had the last say in every pass and
+ held like a weld: Mobile Home's rope bridge kept its end planks rigid at their stops, a step the
+ house's wheels could not climb, where Bullet's give a little under its weight */
+ for (int kk = 0; kk < 3; kk++) {
+ int k = kk ? kk - 1 : 2;
float nx = 0, ny = 0;
float m = fr->m[k];
if (k < 2) {