Angle between two points in vb
Hi guys
I have an enemy type like this
private type enemy
x as integer
y as integer
speed as integer
angle as single
end type
and i move the enemies like this:
enemy(i).x = enemy(i).x + enemy(i).speed * cos(enemy(i).angle)
enemy(i).y = enemy(i).y + enemy(i).speed * sin(enemy(i).angle)
all i need is to find the angle between an enemy and the player so i make a seeking algorithm.
How can i do this?
Virtus junxit, mors non separabit
lone_ranger,
You already asked this question (finding the angle between two points) a few weeks ago, and there are answers in your previous thread, still available here:
http://www.gamedev.net/community/forums/topic.asp?topic_id=102671
I'm going to close this thread, since I consider it to be basically a duplicate of the old thread---and duplicate threads are inappropriate. If you still need advice, please use the old thread.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
[edited by - grhodes_at_work on July 31, 2002 12:55:36 PM]
You already asked this question (finding the angle between two points) a few weeks ago, and there are answers in your previous thread, still available here:
http://www.gamedev.net/community/forums/topic.asp?topic_id=102671
I'm going to close this thread, since I consider it to be basically a duplicate of the old thread---and duplicate threads are inappropriate. If you still need advice, please use the old thread.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
[edited by - grhodes_at_work on July 31, 2002 12:55:36 PM]
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement