How to know what player the camera is facing?
#3

Quote:
Originally Posted by Rudy_
Посмотреть сообщение
Here i've made a Throwing knife thing, which detects the Player in front of you and removes some health.
http://pastebin.com/qeSBDWDd
This will help you, If you want me to explain the script, just reply i'll do it
I think the reason I failed is that I'm horrible in trigonometry, that being said, could you Rudy explain just exactly what each of these lines do (not the obvious parts).
pawn Код:
tmpang = (90-atan2(tmpy-y, tmpx-x));
if(tmpang < 0) tmpang = 360.0+tmpang;
if(floatabs(tmpang-r) < 5.0)
This is so I know for future reference...
Reply


Messages In This Thread
How to know what player the camera is facing? - by Crayder - 08.10.2014, 21:12
Re: How to know what player the camera is facing? - by Rudy_ - 09.10.2014, 08:37
Re: How to know what player the camera is facing? - by Crayder - 09.10.2014, 11:28
Re: How to know what player the camera is facing? - by Rudy_ - 09.10.2014, 12:06
Re: How to know what player the camera is facing? - by Crayder - 09.10.2014, 22:53

Forum Jump:


Users browsing this thread: 1 Guest(s)