C# animation - move object from A to B or by angle
- by Nullstr1ng
Hi am just doing a little animation which moves an object from point a to point b or by angle/radians.
what I currently have is this
Point CalcMove(Point pt, double angle, int speed)
{
Point ret = pt;
ret.X = (int)(ret.X + speed * Math.Sin(DegToRad(angle)));
ret.Y = (int)(ret.Y + speed * Math.Cos(DegToRad(angle)));
return ret;
}
but it doesn't look what i expected.
please help?
update:
oh and am using NETCF