Checking if player is facing an object
#2

Quite complex situation. You have to get relative position of player and object, then using trigonometry and compare required angle with GetPlayerFacingAngle (warning, 2d only, so it'll work for objects above player).

Other solution will require https://sampwiki.blast.hk/wiki/GetPlayerCameraFrontVector
Reply


Messages In This Thread
Checking if player is facing an object - by JaKe Elite - 27.07.2012, 11:00
Re: Checking if player is facing an object - by Misiur - 27.07.2012, 11:13
Re: Checking if player is facing an object - by JaKe Elite - 27.07.2012, 11:35
Re: Checking if player is facing an object - by Kar - 27.07.2012, 11:38
Re: Checking if player is facing an object - by JaKe Elite - 27.07.2012, 11:39
Re: Checking if player is facing an object - by AIped - 27.07.2012, 12:30
Re: Checking if player is facing an object - by JaKe Elite - 27.07.2012, 12:38
Re: Checking if player is facing an object - by Mauzen - 27.07.2012, 12:55
Re: Checking if player is facing an object - by JaKe Elite - 27.07.2012, 13:07
Re: Checking if player is facing an object - by JaKe Elite - 27.07.2012, 13:54

Forum Jump:


Users browsing this thread: 1 Guest(s)