Q1: like blade said, with a c_trace in the direction the player is facing (for optimising speed you could first check if the player is turned at your direction at all, and if so, perform a c_trace to see if there are any objects interfering the player's sight).
Q2: Depends what you mean with 'exactly behind'. Does distance matter? Can objects stand between you and the player? And practically spoken, you can never be exactly behind a player. You will need a definition of what is 'behind'. E.g. define "between 170 and 190 degrees away from player's facing-direction, and within 50 quants" as "behind the player".
Click and join the 3dgs irc community! Room: #3dgs
Re: player looking at me? i am behind player?
[Re: Joozey]
#220289 08/06/0819:4308/06/0819:43
Thank you guys for your help. joozey i couldn't understand that you said (for optimising speed you could first check if teh player is tuned at your direction at all)? how can i check it & it is again the same question i asked? can u give me an example.
And by being exactly behind the player i want the enemy to hold him from behind so other enemies can beat the player ;d
bytheway thanx again guys!
Re: player looking at me? i am behind player?
[Re: iam_ufo973]
#220298 08/06/0820:4408/06/0820:44
look for vec_for_angle in the manual. There's an example of how to turn the player towards something. If you can turn it to some point, then, of course, you can also check if it is looking at that point.
Click and join the 3dgs irc community! Room: #3dgs
Re: player looking at me? i am behind player?
[Re: Joozey]
#220400 08/07/0808:1808/07/0808:18
Ok Q1 is solved by using c_scan. i prefered c_scan because i can scan in a cone which is i think not possible by c_trace.(i don't know if it slows down speed or not?).
Q2 is still unsolved can someone give me an example on how to find if player is behind an entity? Plase
Once again thanx for your help
Re: player looking at me? i am behind player?
[Re: iam_ufo973]
#220423 08/07/0810:4508/07/0810:45