Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Tank chase mouse (2D)

Author
Message
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 14th Dec 2005 19:27
This is basically an example to newcomers of how to use Sin and Cos. I know a thread about this has already been made, but this is slightly different. Notice that with this code you can always estimate what's infront depending on the angle. I used sin and cos in this to move the tank, to plot the points for the tanks main bit, and the next position for the turret. It also shows you hwo to use the atanfull command to get the angle between two coordinates. This can all be used in 3D too



Darkbasic MADPSP
19
Years of Service
User Offline
Joined: 15th Jun 2005
Location: Uk
Posted: 14th Dec 2005 19:41
Not bad at all and i learnt something 8-0

Experienced DB http://www.greatgames3d.com (work in progress site)
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 14th Dec 2005 22:47
yeah, I hoped it would be somewhat helpfull.

Login to post a reply

Server time is: 2024-11-23 07:50:19
Your offset time is: 2024-11-23 07:50:19