can anyone help me in making a formula that enables you to get the X & Y of a certain coordinates from your character, the
given are the angle and distance, like angle=20° and distance from my character is=5.5 .... Thanx
direction(x,y,x2,y2);
distance(x,y,x2,y2);
if(distance(x,y,player.x,player.y)<250)
{
angle = direction(x,y,player.x,player.y);
directional_velocity = 3;
}
else
{
directional_velocity = 0;
}
|90°
|
|________0°
|
|
|270°
MoveTo("Event Actor", cos(degtorad(angle))*radius, -sin(degtorad(angle))*radius, 10, "Event Actor", "");
int X = cos(degtorad(angle))*radius;
int Y = -sin(degtorad(angle))*radius;
Users browsing this forum: No registered users and 1 guest