From e145d4955cd9b0d2fbaf8586c5c84d384e837cca Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Fri, 6 Nov 2015 15:30:16 -0800 Subject: [PATCH] Update tunnel detection to reverse all axes --- examples/baseball/pitching.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/baseball/pitching.js b/examples/baseball/pitching.js index 698810b87f..05f108b165 100644 --- a/examples/baseball/pitching.js +++ b/examples/baseball/pitching.js @@ -496,8 +496,9 @@ Baseball.prototype = { print("Pitch: ", pitch); if (Math.abs(pitch) < 15) { print("Reversing hit"); - myVelocity.z *= -1; + myVelocity.x *= -1; myVelocity.y *= -1; + myVelocity.z *= -1; Vec3.length(myVelocity); foul = false; speedMultiplier = 10;