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

ArcballControls error on mobile devices #29417

Open
krotalias opened this issue Sep 15, 2024 · 2 comments
Open

ArcballControls error on mobile devices #29417

krotalias opened this issue Sep 15, 2024 · 2 comments
Labels

Comments

@krotalias
Copy link

Description

Please, read:

https://discourse.threejs.org/t/arcballcontrol-problems-on-mobile/70160/3

Reproduction steps

  1. Set camera position after the creation of ArcballControls object.
  2. On mobile devices, the model vanishes because this._nearPos0 < 0 in ArcballControls.js
  3. It does not depend on the browser used.

Code

// code goes here

Live example

Screenshots

No response

Version

r168

Device

Mobile

Browser

Safari

OS

iOS

@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 16, 2024

When a control class manages a camera, it can lead to side effects if you change the state of the camera e.g. by changing it position. Usually, you have to notify the controls somehow so they can update their internal state. Using update() of ArcballControls is the intended workflow.

What I don't understand right now is why mobile devices exhibit an issue that does not pop up on Desktop. Do you mind updating the following fiddle so the issue is demonstrated? https://jsfiddle.net/6sxo0bd3/

The fiddle changes the camera position with a simple timeout callback after 2 seconds. I couldn't reproduce the issue on a Pixel 8a with Chrome.

@Mugen87 Mugen87 added the Addons label Sep 16, 2024
@krotalias
Copy link
Author

krotalias commented Sep 16, 2024 via email

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

No branches or pull requests

2 participants