Auto Pilot Funtion. 8D
Posted: Sat Jan 13, 2007 7:48 pm
In a paper airplane game I am Making I have an auto pilot funtion , I thaught I should post it for other people to see if they want to make one Here is the
That is what I have so far, the if (angle == direciot(Ect.) is to stabelise it once it faces the Coin so it will not shake when it faces the coin
- Code: Select all
if (Auto_Pilot == 1)
{
if (angle > direction(x, y, Coin.x, Coin.y)+ 5)angle -= 5;
if (angle < direction(x, y, Coin.x, Coin.y)- 5)angle += 2;
if (angle == direction(x, y, Coin.x, Coin.y))angle = direction(x, y, Coin.x, Coin.y);
That is what I have so far, the if (angle == direciot(Ect.) is to stabelise it once it faces the Coin so it will not shake when it faces the coin