2026-09-16 03:13 UTC
There we go! And to think that the the whole problem of yesterday was a a wrong minus signal. Or rather, a wrong approach to the problem
The problem was that I was checking which of the given start and end points was greater, then doing a different order in the subtraction.
I was doing this
if start > end:
x = start - end;
if end > start:
x = end - start;
When all I needed was this:
x = start - end;
Simply because I don't need to know the positive, natural value of the difference between the points, which was what I was worried about, I just needed to get the result.
Example: starting at -20 and going to -10, x would be +10 in the first case, or -10 in the second. In that first case, I would also have to multiply the result by -1 before dividing by number of interpolation steps.
Next up, I plan on stopping at arbitrary between points, creating a very smooth face turning animation that can stop at any angle. Messing with eyes and mouth in those cases will prove challenging
ANYWAY, I probably won't work much on this for the next couple of days as I scored a side gig with a deadline for monday. #programming #gamedev #raylib #nim
Replies (0)
No replies.