Thread: angle of player
View Single Post
  #7  
Old 08-17-2003, 07:24 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by jake13jake
ugh... no... if the npc moves on it's own it won't give the desired effect. it will pull across, closeto, and inbetween. To give it the current effect that I want, the angle of the npc has to be relative to the player, and I don't know how to get the player's angle, which is my problem.
just calculate the distance on the x and y axis and do a getangle?

dx = centerx - playerx;
dy = centery - playery;
angle = getangle(dx,dy)

that what ya mean?
Reply With Quote