Page 1 of 1

Mafia 3 Cordinates issue..

Posted: Thu Sep 07, 2017 3:54 pm
by XaneXXXX
In the end i want to make a teleport to waypoint script. But right now i have a problem, i have found the player cordinates and the waypoint cordinates. The issue that i have is, Let's say that i freeze the Z cordinate with a high value. It's very buggy, Sometimes he flies up in the air and then falls down again. I tried noping EVERY function/register that writes to the Z cordinate but the same thing occurs. Sometimes he doesn't even move up until i jump over something like a car. Here is an example gif:

[Link]

I have the Z cordinate frozen to a high value during the entire gif, Only when i jump up on the car he flies up but starting to go down again. And yes I'm sure that the compare doesn't inflict with anything else then my player cords only.

I really don't get it. If nothing writes to the Z cordinate, how can i still fall down? :S haha
Any idea why this is happening? Never seen anything like it. Cheers!

Edit: This is what writes to the Z cordinate if it helps:
Image

Re: Mafia 3 Cordinates issue..

Posted: Thu Sep 07, 2017 5:02 pm
by gir489
I ran in to the same issue and gave it the fuck-it adjustment.

It's a physics issue. You're basically going from Z to Z+delta, and that delta is interpreted as velocity. It's just how the engine works. CBF'd to fix it, because I didn't know how to find the velocity. When I looked at what read the coordinates, it was like 20+ lines, and that's when I get it the FIA.

Good luck, though.

Re: Mafia 3 Cordinates issue..

Posted: Thu Sep 07, 2017 5:17 pm
by XaneXXXX
gir489 wrote:
Thu Sep 07, 2017 5:02 pm
I ran in to the same issue and gave it the fuck-it adjustment.

It's a physics issue. You're basically going from Z to Z+delta, and that delta is interpreted as velocity. It's just how the engine works. CBF'd to fix it, because I didn't know how to find the velocity. When I looked at what read the coordinates, it was like 20+ lines, and that's when I get it the FIA.

Good luck, though.
Thanks for your answer! Hmm that makes sense.. But what did you mean by " CBF'd to fix it"?

Re: Mafia 3 Cordinates issue..

Posted: Thu Sep 07, 2017 5:38 pm
by gir489
[Link]'d.

There's a Lua function that sets the player's coordinates. You could try reversing it and see how it sets the Z position without engaging the physics engine.

Re: Mafia 3 Cordinates issue..

Posted: Thu Sep 07, 2017 6:06 pm
by XaneXXXX
gir489 wrote:
Thu Sep 07, 2017 5:38 pm
[Link]'d.

There's a Lua function that sets the player's coordinates. You could try reversing it and see how it sets the Z position without engaging the physics engine.
Yeah i used LUA first. But since the scripthook is outdated/bad coded or whatever. It crashes the game very often when teleporting etc. But thanks for tip. I might try that!