Coordinates of the sight
#11

Try this.
Fire A weapon
Get the origin / hitpoint of the shot
Use https://sampwiki.blast.hk/wiki/VectorSize
Subtract the result this from camera front vector GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ)

That should give you a constant vector you can add to GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ); to figure out where the shot came from. Once you have your constant then test it you might have to compensate for facing angle? Not sure test it out.
Reply


Messages In This Thread
Coordinates of the sight - by nikjda - 25.03.2019, 21:57
Re: Coordinates of the sight - by nikjda - 25.03.2019, 22:00
Re: Coordinates of the sight - by nikjda - 26.03.2019, 21:33
Re: Coordinates of the sight - by Pottus - 26.03.2019, 23:17
Re: Coordinates of the sight - by nikjda - 27.03.2019, 12:11
Re: Coordinates of the sight - by nikjda - 27.03.2019, 23:24
Re: Coordinates of the sight - by Pottus - 28.03.2019, 01:46
Re: Coordinates of the sight - by nikjda - 28.03.2019, 17:48
Re: Coordinates of the sight - by nikjda - 28.03.2019, 17:58
Re: Coordinates of the sight - by nikjda - 30.03.2019, 23:11
Re: Coordinates of the sight - by Pottus - 31.03.2019, 17:50
Re: Coordinates of the sight - by Nero_3D - 31.03.2019, 21:36

Forum Jump:


Users browsing this thread: 1 Guest(s)