15.01.2013, 03:19
Is called Physics ...... U need to get there angles..... and determine it from equations, basic physics is going to be needed to determine this
https://sampwiki.blast.hk/wiki/GetPlayerFacingAngle
https://sampwiki.blast.hk/wiki/GetVehicleZAngle
https://sampwiki.blast.hk/wiki/GetVehicleRotationQuat
http://en.wikipedia.org/wiki/Quatern...atial_rotation
These are very key and after alot of testing and tweeking i think you will be able to create a code where u will be able to find the vehicle position to the player
I thought it might of been something as easy
getting the player angle and vehicle and if the angle is near 180( the difference ) then you that the angle of the vehicle is opposite to the player......
But i am not to sure ... i do a little digging around for u see if i see something maybe even try to code and inbox u it.... But for now that my solution for solving your problem
https://sampwiki.blast.hk/wiki/GetPlayerFacingAngle
https://sampwiki.blast.hk/wiki/GetVehicleZAngle
https://sampwiki.blast.hk/wiki/GetVehicleRotationQuat
http://en.wikipedia.org/wiki/Quatern...atial_rotation
These are very key and after alot of testing and tweeking i think you will be able to create a code where u will be able to find the vehicle position to the player
I thought it might of been something as easy
getting the player angle and vehicle and if the angle is near 180( the difference ) then you that the angle of the vehicle is opposite to the player......
But i am not to sure ... i do a little digging around for u see if i see something maybe even try to code and inbox u it.... But for now that my solution for solving your problem