Skip to content
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

Camera rotation erratic with certain searches #35

Open
eldorel opened this issue Jun 4, 2020 · 1 comment
Open

Camera rotation erratic with certain searches #35

eldorel opened this issue Jun 4, 2020 · 1 comment

Comments

@eldorel
Copy link

eldorel commented Jun 4, 2020

I'm not sure exactly what may be influencing this, but the camera rotation goes ballistic on certain zoom levels and searches.

It almost looks like the camera is shifting the globe to focus on an object, and this causes uncontrolled rotation in searches where there are a lot of evenly spaced objects.

I recorded it and uploaded a Gif here: https://i.imgur.com/Up3Q423.gifv

@thkruz
Copy link

thkruz commented Jan 16, 2021

Its related to the raycasting code that runs in the rendering pipeline. When you click on the earth it uses a readpixels call to access the GPU and determine if you clicked on the earth - that eats up 6ms of a 16ms rendering loop on my high end gaming computer. My guess is that when you add that to the position update call that runs every draw frame and any code related to the group of satellites it is all just too much for your computer to keep up.

The reason it HAS to keep up is that the code has the camera chase the last position of the mouse (simplified explanation). If you get behind then it keeps over compensating and you get that camera shake effect.

If you are forking the code, I'd recommend disabling the raycasting code and just use the code that gets called when you don't hit the earth all the time. I originally did that for my mobile app and then realized it was worth just doing all the time and using the extra rendering time for other things.

Also verify that you limit the number of on mouse move calls to no more than one every 16ms. Otherwise you will have jquery eat into your rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants