-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Zooming scroll wheel too fast zooms through the globe to other side #4855
Comments
A few other users have responded to that forum post saying they've seen this problem, so I marked this issue as 'priority' |
I've definitely seen this on machines other than mac, but it's difficult to reproduce. I've gotten more reports of it on slower machines, which makes me think that sometimes when the frame is delayed there's 'intertia' and the camera tends to clip through terrain or something similar. I'll see if I can reproduce it on a windows machine. |
I saw this yesterday too, on a very slow machine in a demo room here. It happened so consistently I couldn't zoom in close at all even with a few tries. I thought I was losing my mind. |
Also seen this happen with reasonable repeatability, maybe 1 in every 10 times zooming close to the earth. |
@kring do you have any bandwidth to look at this? |
Yeah, I'll see if I can get into that demo room tomorrow to debug it. |
@pjcozzi, @kring, the problem seems to be related to this code block. Here is a sandcastle code that for me produces a similar behavior, often and consistently.
I debugged this a bit and it seems that this behavior happens when the target position, that is used for the camera path calculation, is behind the camera (I don't think this is In this case the angle between Red point : You can stop the code exactly when this bug occur by putting a breakpoint at this line with a condition like this: |
After further investigation, #4887 isn't the right fix. The root of the problem appears to be #4368. |
@kring, on my machine, with the above example code (I edited it a bit to make it shorter), for example, the point is in and So I think the code in |
@duvifn that first point is reported by Considering how consistently this particular machine has a problem (every. single. time.) and how wildly wrong the |
@kring Just to add some information to possibly help with the investigation of whether or not drivers affect it, the MacBook Pro (Retina, 15-inch, Late 2013) that I was having the issue with has an NVIDIA GeForce GT 750M 2048 MB GPU. Another person at my company has the same issue with a Macbook Pro 13" that has an Intel Core i5-5257U with Intel Iris 6100 integrated graphics. It seems to affect Nvidia, AMD and Intel GPUs. |
@smills2929 that would point to it not being GPU/driver related at all, but I can't explain why I'm unable to reproduce it on my laptop even at a low frame rate, but the demo machine experiences the problem so easily. To everyone experiencing this issue that has a Cesium dev environment set up, maybe try making the change that I made in #4887 (sorry I deleted the branch, but just copy the one code change) and see if it helps. |
I've definetly seen it on a number of GPUs, but it can be hard to reproduce on faster hardware. Anecdotally, #4887 sounds like it should work. Whenever I've had issues, it always seemed to be at high load times (around dataSource.load()s, tilting w/ terrain on a lot of horizon tiles get loaded, etc.) when the hitches seem to happen on better hardware. Slower machines would have a lot more of those times, so they see the issue more. I'll try out #4887 on slower hardware and see what happens. |
@kring, Additional examples:
Zooming into terrain on my machine reproduces this bug only in 1/10 - 1/20 of the times. In all of these examples the code fails in the place I mentioned above (in Moreover, If I choose different zoom method, which leads to different code path (for example zoom with tilted camera, close to the earth), I don't run into this issue.
The point is the entity's point in my example code and its value is The point is pretty close to the camera in this case, so it's possible that I didn't check yet the difference between
I didn't try it yet, but it seems good to me. One thing I would suggest is to limit the additional I've tried (In different implementation) checking the angle between |
Using @duvifn 's examples, I'm able to reproduce the bug fairly consistently in master (though not 100%). After a great deal of scrolling I wasn't able to reproduce it using #4887, such as on (http://cesium-dev.s3-website-us-east-1.amazonaws.com/cesium/zoomToNowhere/Apps/Sandcastle/index.html?src=Geometry%20and%20Appearances.html&label=Showcases) |
I can echo what @denverpierce said. I was consistently able to reproduce the bug using @duvifn 's example on 1.29, but was unable to reproduce it using #4887. |
Hi guys, has there been any movement on this? This bug causes us considerable issues when demonstrating our product (constantly having to zoom out and scroll back over to the other side of the planet). Is there anything I can do to help? |
@smills2929 no update, but I added this to #4897, so someone may look at it during the bug bash. Anything you can do to narrow down the cases when it occurs and even the section of code would be valuable. |
@pjcozzi @smills2929 note that @kring writes:
|
I don't know if this is news to anyone, but in the sandcastle example provided by @duvifn I can very reliably reproduce the bug using right-click zoom using what seems like a tiny amount of mouse motion. |
It looks like the reason that sample reproduces so easily is that it places an entity right on the pick position. Try modifying the point in that sample to have a hole in the middle:
Still not perfect, but the zoom bug goes away. |
#4967 definitely fixed the issue with the code sample @duvifn posted. @kring @smills2929 @denverpierce Can you test to see if you can still reproduce this with master? |
#4967 keeps the view from flipping to the other side of the globe, but also halts zooming until the next mouse move event. IE if you're right mouse zooming and the zoom is halted, a user could keep moving their mouse and not realize why the zoom isn't working. It's an improvement. For me, #4887 was a better fix because it doesn't interupt user control. I also tested think that the #4368 causes this issue to appear more often, but is probably an issue with the GPU as I also see #4368 on an AMD card. |
The problem occurs consistently on my very fast computer. Having struggled with this problem since Dec 19th, the pattern coming out is that it is related to the new general pointer support in Chrome/Blink and Firefox/Gecko engines. The problem seems to extend to all browsers using those new engines, and I have tested many. Earlier versions do not have the problem! Completely correlated with the zoom problem is disappearing polylines in a given radius zoom point (a balloon). My app has a range of polylines forming a global network, and the lines are all visible only when the whole hemisphere is visible. As I zoom in, the polylines in a half screen-radius from the zoom point disappear into the ground. Combined with the observation by others that a ballon/point with a whole does not have the zooming problem, my hypothesis is that the surface reference becomes a black hole. Effectively, I think Cesium may be have the ground "disappearing" by either sin() or cos() approaching zero (dividing by zero) as zoom gets closer to the object. It , but is "saved" by not being allowed to go farther that the other side of the globe. What about the correlation with adding general support to pointers? My hypothesis is that Cesium does not handle the new pointer event in Chrome and Firefox robustly, and fails to update a parameter that maintains the correct ground reference while zooming. @kring may therefore be on the right track. Strangely, Edge does not have the problem. Their pointer event model seems to avoid problems in Cesium. Checking polylines, they are fine too! I would not be surprised if Firefox has copied Chrome's pointer event model... Hope these observations can be useful for the Bug Bash and others. |
@keikland |
@cherukumilli are you using the latest version of CesiumJS? This should have been fixed in the 1.31 release |
Reported on the forum: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/o5Zt-SpkZK8
Video example: https://www.youtube.com/watch?v=92_hFjYItLc&feature=youtu.be&hd=1
Also reported here: #4680
Reported on the forum: https://groups.google.com/forum/#!topic/cesium-dev/xeRAg8lObUg
The text was updated successfully, but these errors were encountered: