DarkLotus/mooege — comment on commit 5d320664bdfe1d522c1ac187b4afb550d897f071
File: src/Mooege/Core/GS/Actors/Monster.cs line 124
By DarkLotus:

thanks, took the previous math from an old fork without checking it.

On Sun, Oct 30, 2011 at 9:51 PM, xsochor <
reply@reply.github.com>wrote:

> variable speed - always reaches target in 1/0.174 ticks
> for constant speed (invariant to angle, only X,Y plane):
> speed = speed of moving (distance per 1 tick)
> facingAngle = anlge to look at target from current position
> ticks = frequency of updating
> public static float[] GetDistanceDelta(float speed, float facingAngle, int
> ticks = 6)
> {
> float[] res = new float[2];
> res[0] = (speed * ticks) * (float)Math.Cos(facingAngle);
> res[1] = (speed * ticks) * (float)Math.Sin(facingAngle);
> // omitting Z axis
> return res;
> }
>
> --
> Reply to this email directly or view it on GitHub:
>
> https://github.com/DarkLotus/mooege/commit/5d320664bdfe1d522c1ac187b4afb550d897f071#commitcomment-683607
>