11-04-2022, 12:56 AM
I like how that dynamically resizes the impactor and changes speed.
Dot product returning a negative was how I got mine to readily let a ball back in if one escaped. Given that all the orthogonals in mine were pointed inward, it was as simple as skipping the bounce code if the dot product result was negative. If it was negative it meant that the ball had to be outside already. However, before I implemented that test, the ball would reflect off the out side just the same as the inside, meaning that the bounce calculation is insensitive to the sign of the result. That was an eye opener for me. A very useful tool indeed. It also figures heavily in my pool program, doing the two moving ball deflections.
Dot product returning a negative was how I got mine to readily let a ball back in if one escaped. Given that all the orthogonals in mine were pointed inward, it was as simple as skipping the bounce code if the dot product result was negative. If it was negative it meant that the ball had to be outside already. However, before I implemented that test, the ball would reflect off the out side just the same as the inside, meaning that the bounce calculation is insensitive to the sign of the result. That was an eye opener for me. A very useful tool indeed. It also figures heavily in my pool program, doing the two moving ball deflections.
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
sha_na_na_na_na_na_na_na_na_na: