When using GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS, the input vector is Vector3(right/left, front/back, up/down).
But using Entity.GetOffsetPosition, it seems to be Vector3(right/left, up/down, front/back).
Y and Z are switched.
Why does it behave like this?
I use the latest FiveM version (I had an update tonight) and also tried the latest CitizenFX version.
But the Function.Call returned the correct value.
The wrong value was returned by LocalPlayer.Character.GetOffsetPosition(new Vector3(0.0f, 1.5f, 0.0f));
I wanted to see if there was a difference with between this result and the one from the native function, that’s why I called it using Function.Call (apart from calling GetOffsetPosition oc).
The odd thing is, I’m unable to reproduce the problem using the same code as before, I will see if it happens again…
I’m used to ScriptHookVDotNet2, so I didn’t think about using API
Thanks a lot for your testing btw, I will reopen a thread if I encounter this issue again and I will test it using these 4 different ways.