# VB6: sin, tan, cos...

I need help wt trigonometric functions.
Say I want to know how far a character must move in X & Y terms
if they're faced a certain angle. (ie. if the char is 40*, how
far will it go in X & Y if it travels 200)

I also need 2 know about how 2 retrieve angles.
ie. At what angle an enemy is from a character.
I tried sin, tan, cos but I can't figure them out.

Thanks.
[red]Dragon[/red][purple]storM[/purple]

• : I need help wt trigonometric functions.
: Say I want to know how far a character must move in X & Y terms
: if they're faced a certain angle. (ie. if the char is 40*, how
: far will it go in X & Y if it travels 200)
:
: I also need 2 know about how 2 retrieve angles.
: ie. At what angle an enemy is from a character.
: I tried sin, tan, cos but I can't figure them out.
:
: Thanks.
: [red]Dragon[/red][purple]storM[/purple]
:
:
If memory serves, the problem with VB is that the only inverse function is arctangent (atn)
The angle would be atn(deltaX/deltaY) in radians, multiply by 180/pi for degrees

• Thanks!

[red]Dragon[/red][purple]storM[/purple]