Examples: implemented multi touch rotate for trackball controls
Related issue: N/A
Description
Implemented multi touch rotate for trackball controls, allowing to rotate the camera around it's look axis
https://user-images.githubusercontent.com/11520795/172782570-d96f2c8e-80f1-498c-bba7-bb662f5ef227.mp4
https://raw.githack.com/surdu/three.js/trackball-touch-rotate/examples/misc_controls_trackball.html
Do you mind updating examples/jsm/controls/TrackballControls.js instead? Files in the example/js version are auto-generated.
My bad! Fixed it 😉
Your code works like a charm!
I just wonder if every user of TrackballControls will be happy with this change since the default behavior is now different. Devs could consider the new behavior as buggy/unwanted.
What do you think about introducing a new flag that enables the new behavior? E.g. multiTouchRotate with default false.
@Mugen87 Sounds good! Pushed a commit that does that. Enabled it in examples for visibility, but the default in TrackballControls is false
I have reverted the PR for now. A feature like multi touch rotate should not affect the existing usage of the controls
Agree. I'll investigate the issue and re-open another PR