GetPlayerCameraFrontVector Updating
#1

Well, I have two computers. On one of them (the laptop), flymode works beautifully and smooth. On the other (the desktop), not so much.

On the laptop my camera always moves where I'm looking (well, not instantly depending on ping, but that's perfectly fine).

On my desktop I can be trying to move straight and it'll occasionally start going sideways (even though my camera never turned). Also, when I do turn the camera takes a lot longer to start going the other direction, which is normal when your ping is high but mine is localhost speed for fucks sake.



So I ran a test on both machines, just printing the results of GetPlayerCameraFrontVector every 100 ms.

On the laptop the results were almost always what they should be, the direction I'm facing.

On the desktop however, only like half of them were the direction I was facing. All of the rest seemed random.



Does anyone else experience this? What could cause this specifically on my desktop (which has much better hardware by the way)?

Note: I was holding the aim key during the test which makes GetPlayerCameraFrontVector and GetPlayerCameraPos update much faster.

EDIT: Since I did that test like 2 months ago and forgot what exactly happened, I just did the test again. Apparently the camera position gets all 0's and in the front vector the X and Z gets 0's. I find it strange, but the front vector's Y actually remains correct.
Reply
#2

Mouse moving by itself? I have a worn out mouse pad which does that occasionally.
Reply
#3

Quote:
Originally Posted by Kimble
Посмотреть сообщение
Mouse moving by itself? I have a worn out mouse pad which does that occasionally.
No, absolutely not. Read what I just added in the edit.

I don't even use a mouse pad, and I use the same mouse on both my desktop and laptop.



EDIT: Perhaps a temporary fix would be checking if the CP is zeroed out, and if so use the last CP and last FV.
Reply
#4

Quote:
Originally Posted by Crayder
Посмотреть сообщение
EDIT: Perhaps a temporary fix would be checking if the CP is zeroed out, and if so use the last CP and last FV.
Well I did this, but without the "last CP" part. It only sets the last FV, however, this is still not working.

I replaced GetPlayerCameraPos with GetPlayerObjectPos, so instead of messing up with the wrong camera position it'll use the object's position. The camera is attached to the object anyways. Now CP never get's zeroed out.

The FV does still get messed up X and Z though, they both return zeros like half the times I call GetPlayerCameraFrontVector.
Reply
#5

I had the same problem. I used Nero3D's include (https://sampforum.blast.hk/showthread.php?tid=480286) and it worked preety well. It has a lot of checks for more acurate values.
Reply
#6

Quote:
Originally Posted by ExTaZZ69
Посмотреть сообщение
I had the same problem. I used Nero3D's include (https://sampforum.blast.hk/showthread.php?tid=480286) and it worked preety well. It has a lot of checks for more acurate values.
You used ScreenToWorld for flymode? That's a bit extensive for sure.

Even so, GetPlayerCameraFrontVector is returning bad values. So that include would also be troubled.
Reply
#7

I guess you already excluded mods as the cause, and tried a reinstall?
Reply
#8

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
I guess you already excluded mods as the cause, and tried a reinstall?
Yeah, I have both a modded and non-modded version (which I switch between using an AHK macro that edits SA-MP's registry path) on both computers.

The problem occurs on both versions on the desktop, and neither version on the laptop.
Reply
#9

Well, this is still happening. After all these years this had to have happened to someone other than me... I've reinstalled everything except Windows itself! Nothing helps! I'm not going to reinstall Windows just for something like this, especially with the chance that it could have absolutely nothing to do with the problem.
Reply
#10

I have used flymode on 2 laptops and 3 desktops, different specifications, different dimensions, different resolutions, different hardware, Windows 7, 8, 10. All good.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)