SP4CEBAR 2022-09-02 22:31
Wait for the perfect corner hit
nathanielbabiak 2022-09-03 03:04
Hey do you want some help discussing an algorithm that will address the "perfect corner hit"? If not, I'll just excitedly await the next upload!
SP4CEBAR 2022-09-03 07:53
I didn't think about that yet, this is mostly a demo of the rotations, but it sure is an interesting math problem, tbh I don't know where to start to solve it, wait maybe a parametric equation with an absolute X and Y will get me any closer...
Something like ABS(-ABS(T)),ABS(-ABS(-T)), now I've got to test it in desmos...
The dimensions are 0,135 by 0,103, to make the sprite appear to not exit the screen, the starting position is 10,10, and the first direction vector is 1,-1
SP4CEBAR 2022-09-03 08:21
I managed to make a triangle wave in Desmos using MOD(), which I put in a parametric formula which got me the result I wanted, but I can't do algebra with MOD(), so I still don't know how to solve it
SP4CEBAR 2022-09-03 08:35
I've got an idea, don't flip the line, just move the field
Line: Y=-X
T=[0,1,...,100]
X=T*135
Y=T*106
Algebra:
T*106=-T*135
T=-T*135/106
T is a 1D array, so: find an index pair of T that fulfills this condition
I guess since the dimensions of the box aren't anywhere near square, I guess the bouncing object should get everywhere, so it should hit the corner at some point
SP4CEBAR 2022-09-04 13:27
This looks so silly