kienamtics
This commit is contained in:
@@ -294,8 +294,9 @@ function armsCrossed(theta1, theta2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const cross1 = lineIntersectsBox(m1x, m1y, e1x, e1y, -BOX_HALF_W, BOX_HALF_W, BOX_Y_MIN, BOX_Y_MAX);
|
||||
const cross2 = lineIntersectsBox(m2x, m2y, e2x, e2y, -BOX_HALF_W, BOX_HALF_W, BOX_Y_MIN, BOX_Y_MAX);
|
||||
// Motors are at Y=0, so they are inside BOX_Y_MIN=-10. Start the collision box above the motors.
|
||||
const cross1 = lineIntersectsBox(m1x, m1y, e1x, e1y, -BOX_HALF_W, BOX_HALF_W, 15, BOX_Y_MAX);
|
||||
const cross2 = lineIntersectsBox(m2x, m2y, e2x, e2y, -BOX_HALF_W, BOX_HALF_W, 15, BOX_Y_MAX);
|
||||
|
||||
// Also check if elbows went rogue (e.g. wrapped entirely around the wrong side)
|
||||
const e1_rogue = e1x > BOX_HALF_W && e1y < BOX_Y_MAX;
|
||||
|
||||
Reference in New Issue
Block a user