Pickups don't have nav routes.
juicermv opened this issue · 27 comments
At the moment, pickups do not have nav routes because their coords are a little messed up. Working on a fix.
Couldn't manage to fix it. Help would be appreciated.
Still trying to understand what's gone wrong for you. Probably you decompressed coordinates wrongly: AndroidModLoader/GTASA_GPS@2a45634
That might be the issue. I'll try that out, thanks.
Let me know later
Where is the function UncompressLargeVector
declared in the code sample you sent? I'm trying to find whether there's a plugin sdk equivalent
What I've tried doing up until this point is find the pickup via first getting the blip trace's object (parsing the handle into a function under CPools
) and then use a function in CPickups
that gets an object's pickup. I then get the pickups (uncompressed) position using GetPosn()
. The issue is that the position returned is completely wrong. I've also tried manually decompressing the position via getting the m_vecPos
of the pickup which does return a compressed vector. I then decompress it using uncompress(destVec)
. This also returns broken coordinates. For reference I'm testing this in Burning Desire.
Compressing is done simply by dividing float value. Large vector is 128-divided.
I'm not even using plugin-sdk because im working with a Mobile version of the game
Compressing is done simply by dividing float value. Large vector is 128-divided.
Either way something is wrong with the coordinates compressed or not. Idk what to do here at this point.
inline CVector UncompressLargeVector(const CompressedVector& compressedVec) {
return { static_cast<float>(compressedVec.x) / 8.0f, static_cast<float>(compressedVec.y) / 8.0f, static_cast<float>(compressedVec.z) / 8.0f };
}
Sorry, i told you about 128... That was 8, oops.
inline CVector UncompressLargeVector(const CompressedVector& compressedVec) { return { static_cast<float>(compressedVec.x) / 8.0f, static_cast<float>(compressedVec.y) / 8.0f, static_cast<float>(compressedVec.z) / 8.0f }; }
Might try this later but doubt this will help sadly as pluginSDK has built in compressed vector decompression implemented and I've tried to no avail. Thanks for taking the time to help so far though.
You can just write your own decompressor for that. Probably you can just do this (im sure every structure value is public):
CVector pos = CVector((float)compvec.x, (float)compvec.y, (float)compvec.z) / 8.0f;
Just give it a try, should work
Yeah I'll try it out when I find the time thanks.
Are you alive, lol?
Been busy lol. I don't think it's an issue with the decompressed coordinates. I'll try to see if the issue still persists after recent my recent changes.
Im 100% sure you used the wrong decompress function.
The compressed vector class literally has a decompress function. That's what I used.
The compressed vector class literally has a decompress function. That's what I used.
It has multiple functions if you still dont understand
Use this: #1 (comment)
Check your code then
My guy I think it's fair at this point to just admit you have no idea what you're talking about instead of trying to put the blame on me
My guy I think it's fair at this point to just admit you have no idea what you're talking about instead of trying to put the blame on me
I have it working for a year on mobile.
The mobile version is a completely different codebase and engine
You don't know a lot about it.