I am trying to take angle A and smoothly rotate that angle towards angle B at a speed of S where the speed decreases with the distance between angle A and B. While angle A also turns via the shortest path to angle B.
A script I was given as a model for this:
Function: rotate_to_destination( A , B , S ); return ( A + ( sin( ( B - A ) * ( pi / 180 ) ) * S ) ); I've been using this and it works great except for a single problem: the time it takes for A to turn to B is lengthened significantly when the distance between A and B is exactly 180.
I'm not much for math so I haven't be able to fix the problem or cleverly come up with my own. Nor have I found another solution.