14.08.2011, 00:53
(
Последний раз редактировалось Nero_3D; 02.01.2016 в 02:51.
)
GetPlayerCameraWeaponVector
As the title says, here I am providing a function which gets roughly the vector if you aim with a ranged weapon
Parameters
This include only contain one function, you are free to copy / paste it
Download
GitHub v5
GitHub v3
Changelog v5
The major change is that I changed the code from a constant (~accurate with +-5 degrees) to a function
I know everyone likes images therefore I present the interpolation (---) for the measurement (points), y = zRot-Offset, x = Z-Vector
Well this could have been more accurate but I wanted to use a simple polynomial (y = a*(x-b)^c + d)
Anyway should be somehow accurate if you don't aim to low < -35 degrees
As the title says, here I am providing a function which gets roughly the vector if you aim with a ranged weapon
Parameters
Код:
(playerid, & Float: vX, & Float: vY, & Float: vZ) playerid The ID of the player you want to obtain the camera weapon vector of. Float: vX A float to store the X coordinate, passed by reference. Float: vY A float to store the Y coordinate, passed by reference. Float: vZ A float to store the Z coordinate, passed by reference. Returns false if there wasn't a ranged weapon equipped or the player isn't connected
Download
GitHub v5
GitHub v3
Changelog v5
The major change is that I changed the code from a constant (~accurate with +-5 degrees) to a function
I know everyone likes images therefore I present the interpolation (---) for the measurement (points), y = zRot-Offset, x = Z-Vector
Well this could have been more accurate but I wanted to use a simple polynomial (y = a*(x-b)^c + d)
Anyway should be somehow accurate if you don't aim to low < -35 degrees