![]() |
getangle questions
So, how would I use getangle? What type of number does it put out? Does it get an angle of 0-360? 0-3?
And, if I wanted to make an npc look in the direction of the player, how would I use this? |
getangle() returns the radian angle (between 0 and 6.28318530...).
For an npc to face a player, use NPC Code:dir = getdir( playerx - x , playery - y ); |
getangle(dx,dy), where
dx is the change in x coordinates points between the two points dy is the change in y coordinates points between the two points |
oh, makes sense. I did
dir = getdir( playerx - x , playery - y ); but instead of getdir i used getangle and it didnt work. Thanks this cleared up alot of questions :) |
Quote:
|
| All times are GMT +2. The time now is 02:21 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.