camera-controls icon indicating copy to clipboard operation
camera-controls copied to clipboard

"setOrbitPoint" will affect the "dollyToCursor" method cannot be maintained.

Open Innovgame opened this issue 2 years ago • 7 comments

Describe the bug

Hello, I am using camera-controls and want to achieve a function that can always rotate the camera around the origin. Therefore, I used setOrbitPoint. However, I found that the dollyToCursor set during the zoom process became invalid. I am not very familiar with this part of the code and I am not sure if it is a bug. I hope to get your help.

To Reproduce

Steps to reproduce the behavior:

  1. examples/orthographic.html demo image
  2. select dollyToCursor
  3. drag
  4. rotate
  5. zoom

Code

No response

Live example

No response

Expected behavior

maintain the effect of dollyToCursor.

Screenshots or Video

https://github.com/yomotsu/camera-controls/assets/38150357/b7e667aa-888e-4333-9ad2-9fb30d361c38

Device

Desktop

OS

Windows

Browser

Chrome

Innovgame avatar Jun 06 '23 02:06 Innovgame

Thanks for using camera-controls. I think that is the known issue, caused by focalOffset

  • https://github.com/yomotsu/camera-controls/issues/303
  • https://github.com/yomotsu/camera-controls/issues/316

and I can't fix it unfortunately🥲 TBH, I would like to remove setOrbitPoint() and other focalOffset related features...

yomotsu avatar Jun 06 '23 03:06 yomotsu

Thank you for your reply. I have tested it and found that it is indeed related to focalOffset. However, I don't have a good idea on how to solve it yet.

Innovgame avatar Jun 15 '23 02:06 Innovgame

I don't have a good idea on how to solve it yet.

Same here😢

yomotsu avatar Jun 15 '23 05:06 yomotsu

Closing due to lack of feedback.

yomotsu avatar Jul 22 '23 15:07 yomotsu

@yomotsu does it make sense to close this issue since its still not working?

vulevukusej avatar Aug 02 '23 13:08 vulevukusej

Oh, sorry it was a mistake... But unfortunately, I have no plan to fix it because focalOffset which is used in setOrbitPoint causes many other problems. Hope someone could solve it one day... Reopening the issue.

yomotsu avatar Aug 02 '23 14:08 yomotsu

@yomotsu Yeah I see it's a tricky one. Thanks anyway for all your work!

vulevukusej avatar Aug 02 '23 15:08 vulevukusej