New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird camera movement in the map editor #763

Closed
NoType1 opened this Issue Dec 2, 2018 · 49 comments

Comments

Projects
None yet
@NoType1
Copy link

NoType1 commented Dec 2, 2018

Describe the bug
The freecam has very weird and snappy movement. So if you try to move your camera, it feels as if it is being snapped into place instead of moving smoothly (like it used to be)

To reproduce

Steps to reproduce the behaviour:

  1. Go to local map editor (it can be in a server as well)
  2. Move camera around when its in the freecam mode

Expected behaviour
A properly functioning freecam with no snappy movement. (I'm reporting this on the behalf of lots of other mappers, including myself)
The bug does not occur when you press F for the cursor mode.

Version
MTA 1.5.6 Latest build.
OS: Windows 10, 8.1 and 7

Additional context
I hope that someone can find a fix for this. It is very frustrating, and totally demotivating.
This has all started after the latest update.

@NoType1

This comment has been minimized.

Copy link

NoType1 commented Dec 2, 2018

Here's a screenshot of my settings
image

@Aqu1L

This comment has been minimized.

Copy link

Aqu1L commented Dec 2, 2018

I've got the same problem, reinstalling MTA & GTA didnt help.
+More mappers have this problem :c

@qaisjp qaisjp transferred this issue from multitheftauto/mtasa-blue Dec 2, 2018

@CodyJL

This comment has been minimized.

Copy link

CodyJL commented Dec 2, 2018

Set FPS limit to 60, at-least for me 30 FPS has been slower then normal with the latest updates.

@NoType1

This comment has been minimized.

Copy link

NoType1 commented Dec 2, 2018

Set FPS limit to 60, at-least for me 30 FPS has been slower then normal with the latest updates.

Sadly that doesn't work either..
I have reinstalled my mouse drivers, people have reinstalled MTA and GTA SA. Nothing seems to work.

@moon91210

This comment has been minimized.

Copy link

moon91210 commented Dec 2, 2018

I can confirm the camera is broken. All the mappers I talk to have the same problem, they're all on different computers and servers too. Everytime I want to help out my buddy with a map I get reminded that the camera is broken and that I just can't work with it at all.

@CodyJL

This comment has been minimized.

Copy link

CodyJL commented Dec 2, 2018

Would you mind trying this - https://github.com/CodyJL/Editor-2 and seeing if the camera movement is the same? (narrows down if it's related to MTAs editor or something internal)

@moon91210

This comment has been minimized.

Copy link

moon91210 commented Dec 3, 2018

Cody, your camera behaved the same when I tested your resource. Are you using the freecam resource by any chance? That's what the mta editor is using.

@CodyJL

This comment has been minimized.

Copy link

CodyJL commented Dec 3, 2018

I was just verifying there wasn't a recent update with the editor because this uses a modify version of 'Freecam'. I will look into what is causing the delay and report back.

@NoType1

This comment has been minimized.

Copy link

NoType1 commented Dec 5, 2018

Your camera also behaved the same for me. Did you have any luck in finding the bug?

@CodyJL

This comment has been minimized.

Copy link

CodyJL commented Dec 10, 2018

I believe this - #643 (comment) is related.

@Deltanic

This comment has been minimized.

Copy link

Deltanic commented Dec 10, 2018

That issue is a graphical glitch and has nothing to do with this. This issue is is related to imprecision in onClientCursorMove. In fact, I would argue the current situation might be a hack since there is no better alternative. Dumping the values of aX and aY of the code here at a constant mouse moving rate yields a sequence similar to the following:
3, 4, 3, 3, 4, 3, 10, 3, 4, 0, 3, 3, 4, 10, 4, 3
Obviously, these outliers cause the glitchy feel to the freecam.

Also related: the onClientMouseMove event is called more frequently than onClientRender. This may cause some jitter too, since onClientMouseMove could be called twice per frame, causing the camera to update twice before it is visibly rendered.

My guess is that the outliers within onClientCursorMove are caused by irregular repositioning of the cursor, allowing the mouse to move further away from the screen center before it is recentered. Not sure what the cause of that is, though.

Is it perhaps technically viable to implement a function that is able to get the mouse movement speed without relying on the repositioning, possibly as a control state? Such a function would inherit the mouse sensitivity from the game, and allow use in onClientRender, effectively solving both issues.

@MegadreamsBE

This comment has been minimized.

Copy link

MegadreamsBE commented Dec 10, 2018

Proper interpolation could smooth things out then (consistent timing between moving between two camera positions).

@CodyJL

This comment was marked as spam.

Copy link

CodyJL commented Dec 10, 2018

@Deltanic

This comment has been minimized.

Copy link

Deltanic commented Dec 10, 2018

Just because it makes it more annoying doesn't mean the issues are related to one another. One is a graphical issue, the other is an input issue.

@CodyJL

This comment has been minimized.

Copy link

CodyJL commented Dec 10, 2018

@NoType1

This comment has been minimized.

Copy link

NoType1 commented Dec 10, 2018

So is there a way to fix this properly? I'm sorry, I'm not a scripter. A friend told me where to report this issue. I really appreciate you guys trying to figure it out though :)

@CodyJL

This comment was marked as spam.

Copy link

CodyJL commented Dec 10, 2018

I'm doing an updated freecam system for my new map editor and I'll summit a patch to the current editor as soon as it's done. (Or better idea would be to use my editor when it's done)

@multitheftauto multitheftauto deleted a comment from NoType1 Dec 10, 2018

@Dutchman101

This comment has been minimized.

Copy link
Collaborator

Dutchman101 commented Jan 1, 2019

If your definition of "snappy movement" is the precision of your cursor (for convenience of understanding, let me describe it as the amount of pixels your crosshair moves per tiny movement, aka lowest possible sensitivity).. then I can confirm that it behaves exactly the same on 1.5.5 r14281.

I carried out my test with different mouse sensitivity setting values, and found no significant difference. I also confirmed that the auto-updater didn't override my build number while testing (anyone planning to try reproduce really needs to pay attention, you cannot really launch 1.5.5 more than once), therefore I am confident that no recent change in MTA has caused it, atleast for my configuration: Windows 10 1809 with AMD/ATI and the latest drivers for my R9 290 GPU. The reason I describe this is that because if it's unlikely to be a recent change in MTA, it may aswell be a driver or OS problem and introduced with an external update that may affect MTA/particular games.

My test was a couple of weeks ago, I'm not sure about the exact Win10 build number or GPU driver version at the time, it could aswell have been Win10 1803. I don't have access to an PC with earlier builds of Win10 and I really think the combination of that and downgrading GPU/other drivers a few times is the ideal reproduction test case. I hope that there's others willing to do that, and compare results, preferably someone who also regularly maps and therefore knows how it's supposed to feel: I am not, and if I were to start using freecam now, I wouldn't be able to tell that it's supposed to have a higher precision or is less than ideal, it doesn't seem way off to me.
But of course, vice versa it's even possible that my specific hardware/driver configuration makes it so that I'm not even affected to begin with, invalidating all of my observations; I think it's a good idea that someone experiencing the problem records it on video.

@qaisjp

This comment has been minimized.

Copy link
Member

qaisjp commented Jan 3, 2019

I think I am experiencing this as well, but I can't tell for sure.

@NoType1

This comment has been minimized.

Copy link

NoType1 commented Jan 7, 2019

@qaisjp @CodyJL any luck on fixing the issue already? I honestly don't think it's linked to drivers..

@qaisjp

This comment has been minimized.

Copy link
Member

qaisjp commented Jan 8, 2019

Can you install https://nightly.mtasa.com/mtasa-1.4.1-rc-7382-20150731.exe and see if you can reproduce this issue? I am seem to be experiencing the issue with that version of MTA as well.

@StifflersMom

This comment has been minimized.

Copy link

StifflersMom commented Jan 8, 2019

I also have this issue (Windows 7 x64), the 1.4.1 works like a charme, the actual 1.5.6 moves crappy ...

@qaisjp

This comment has been minimized.

Copy link
Member

qaisjp commented Jan 8, 2019

@StifflersMom

This comment has been minimized.

Copy link

StifflersMom commented Jan 8, 2019

2 videos with map editor, moving the mouse like a sine form (up and down), then try to target some objects:
https://www.youtube.com/watch?v=wEtESDe1StM (1.4.1)
https://www.youtube.com/watch?v=jfy8pDwJAPc (1.5.6)

It's very difficult to demonstrate it with a video, also my mouse has no a high resolution, but you may see the laggy movement with 1.5.6

@NoType1

This comment has been minimized.

Copy link

NoType1 commented Jan 8, 2019

I can totally tell the difference between 1.4.1 and 1.5.6

@qaisjp qaisjp transferred this issue from multitheftauto/mtasa-resources Jan 8, 2019

@qaisjp qaisjp added this to the 1.5.7 milestone Jan 8, 2019

@qaisjp qaisjp added the bug label Jan 8, 2019

@qaisjp

This comment has been minimized.

Copy link
Member

qaisjp commented Jan 8, 2019

@Deltanic has narrowed it down to r14746. r14744 works fine for him.

https://buildinfo.mtasa.com/?SHA=&Author=&Branch=&Revision=14746

So this is likely caused by bc94009 (cc @ccw808)

@KnOwNmta

This comment has been minimized.

Copy link

KnOwNmta commented Jan 9, 2019

Hello,
Please, It would be kind of you to look after the problem and get it solved as soon as possible. I'm managing a Discord Community for mappers in Multi Theft Auto and a lot of people, if not everyone is struggling and pissed off. We all have projects to finish but unfortunately, we can't bear with the current state of the editor. We appreciate your work!

@zatley

This comment has been minimized.

Copy link

zatley commented Jan 9, 2019

Please fix, I can't finish my feat with Vortex right now!!

qaisjp added a commit that referenced this issue Jan 9, 2019

Revert "Refactored frame rate limiter"
This reverts commit bc94009.

This partially reverts 96549e8 as well.

This is an investigatory fix for #763.
@qaisjp

This comment has been minimized.

Copy link
Member

qaisjp commented Jan 9, 2019

OK, in 6 or 7 hours try the latest nightly.

If you do not have a nightly build:

  1. Start MTA
  2. Click Settings
  3. Click on the Advanced tab
  4. Update your build type in the "Auto updater" section

Please report back and tell us if this fixes your problem. Also please tell us your graphics configuration.

@NoType1

This comment has been minimized.

Copy link

NoType1 commented Jan 9, 2019

Thank you very much for trying to resolve this issue

@qaisjp

This comment has been minimized.

Copy link
Member

qaisjp commented Jan 10, 2019

Okay, @NoType1 @zatley @KnOwNmta please tell us:

  • If the latest nightly update solves the issue for you
  • What is your graphics card?

If the auto-updater doesn't work after following the instructions here: #763 (comment), you can click here instead.

@1thwonder

This comment has been minimized.

Copy link

1thwonder commented Jan 10, 2019

Latest nightly update didn't fix it for me.
GPU: GTX 970

@ccw808

This comment has been minimized.

Copy link
Member

ccw808 commented Jan 10, 2019

Please confirm which version you tested with by pressing F8 and entering the command: ver

@botder

This comment has been minimized.

Copy link
Member

botder commented Jan 10, 2019

Please also try the test branch with a solution without the reverted commits. You can get the build here: MTA:SA Test Builds under feature/test-message-loop.

Download link for the Windows MTA:SA client: https://nightlytest.mtasa.com/download?type=windows32&branch=feature%2Ftest-message-loop&hash=a4a09aed0880d1e923c945c93e579e5626aeda21

Note: Test builds do not include the default resource package, you have to copy these.

@1thwonder

This comment has been minimized.

Copy link

1thwonder commented Jan 10, 2019

I tested v1.5.6-release-16256.

@1thwonder

This comment has been minimized.

Copy link

1thwonder commented Jan 10, 2019

Test Branch build fixed it for me. (Multi Theft Auto v1.5.6-custom)

@NoType1

This comment has been minimized.

Copy link

NoType1 commented Jan 10, 2019

Tested v1.5.6-release-16256 with a GTX1050Ti, that did not fix the problem for me either

@botder

This comment has been minimized.

Copy link
Member

botder commented Jan 10, 2019

@NoType1 Please test the test branch build above.

@NoType1

This comment has been minimized.

Copy link

NoType1 commented Jan 10, 2019

@botder the test branch build fixed it for me as well! :)

@KnOwNmta

This comment has been minimized.

Copy link

KnOwNmta commented Jan 10, 2019

@botder The test branch build fixed it for me. The latest nightly didn't @qaisjp

GPU: NVIDIA GeForce GTX 1060

@StifflersMom

This comment has been minimized.

Copy link

StifflersMom commented Jan 10, 2019

@botder The test build fixed it for me, too.

Multi Theft Auto v1.5.6-release-16262 moves much smoother, setting fps to 25 in map editor does not freeze the movement.

Multi Theft Auto v1.5.6-release-16257 moves totally laggy, setting fps to 25 in map editor freezes the movement mostly for some seconds, sometimes for more than 10 sec.

GPU: Nvidia GTX 660

edit: I checked the 16262 against the test build more times now, the 16262 moves good but the test build moves perfect. Also there are no movement dropsin map editor if I set fps to 25 with the test build.
If i set fps to 25 with 16262, there are drops in movement in map editor.

@ccw808

This comment has been minimized.

Copy link
Member

ccw808 commented Jan 10, 2019

@1thwonder

This comment has been minimized.

Copy link

1thwonder commented Jan 10, 2019

Multi Theft Auto v1.5.6-release-16262 seems to be working fine, I think you've solved it.

@NoType1

This comment has been minimized.

Copy link

NoType1 commented Jan 10, 2019

@ccw808 Yes! It works. It feels very smooth again. Thank you very much :)

@ccw808

This comment has been minimized.

Copy link
Member

ccw808 commented Jan 10, 2019

As the test branch has slightly better results according to StifflersMom, I think we should revert 61fccbc (Revert "Refactored frame rate limiter") and merge a4a09ae (Add extra message loop in idle handler)

@qaisjp

This comment has been minimized.

Copy link
Member

qaisjp commented Jan 10, 2019

Sounds good to me. @botder if you're happy with that please go ahead 🙂 🎉

@botder botder closed this in ca306e4 Jan 10, 2019

@botder botder self-assigned this Jan 10, 2019

@CodyJL

This comment has been minimized.

Copy link

CodyJL commented Jan 11, 2019

Can someone test to see if #643 has been fixed? Sounds like this could very likely have been related.

@TemaSM

This comment has been minimized.

Copy link

TemaSM commented Jan 12, 2019

@CodyJL I finished testing (will attach dxdiag report to corresponding issue). Problem still occurs 😢

@patrikjuvonen

This comment has been minimized.

Copy link
Collaborator

patrikjuvonen commented Jan 12, 2019

These fixes were never supposed to fix screen tearing and any discussion should be moved to the corresponding issue at #643. Locking this issue.

@multitheftauto multitheftauto locked as resolved and limited conversation to collaborators Jan 12, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.