problem with quats
#1

Hi, i have a probem with include rotations.inc by Nero_3D. if in vehicle aren't any player GetVehicleRotationQuat returns incorrect values. Who anyone knows a solution? Thanks for all answers.
https://github.com/Shiska/rotations/...r/rotation.inc (main code)
https://github.com/Shiska/rotations/...ation_misc.inc (GetVehicleObjectPositionOffset, GetVehicleObjectPositionWorld functions)
Reply
#2

bumpp
Reply
#3

No there is no solution I've been through this and that function is definitely not reliable. The only remote possibility would be to use ColAndreas to figure out the rx/ry rotation of the surface then just get the z rotation of the vehicle. Only works if the vehicle is on the ground.
Reply
#4

YSF fixed this some time ago. The correct quaternion is stored in the server memory (GetVehicleZAngle converts it correctly), but the quaternion function doesn't return it if noone is in the vehicle.

It's also possible to "catch" the correct quaternion from the player sync data (basically listen for that packet and store it everytime it updates) if you use the SAMP.RakNet plugin.
Reply
#5

Quote:
Originally Posted by NaS
Посмотреть сообщение
YSF fixed this some time ago. The correct quaternion is stored in the server memory (GetVehicleZAngle converts it correctly), but the quaternion function doesn't return it if noone is in the vehicle.

It's also possible to "catch" the correct quaternion from the player sync data (basically listen for that packet and store it everytime it updates) if you use the SAMP.RakNet plugin.
Oh really.... I will just shut the fuck up then! Should have made sure.
Reply
#6

ok, thank guys
Reply
#7

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Oh really.... I will just shut the fuck up then! Should have made sure.
Well you're still right, it's inaccessible without additional plugins.

Either way, the best place to (de)attach objects is still a flat surface and a vehicle with a player inside. Even with the correct quaternions it's not 100% accurate at all times.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)