webaverse / app

Web metaverse client
https://app.webaverse.com
MIT License
338 stars 212 forks source link

Dragon icon preview rotation bug #3640

Closed tcm390 closed 1 year ago

tcm390 commented 1 year ago

In fitCameraToBoundingBox function, we set the direction according to the camera position and bounding box center. So I think we should also set the camera position based on the bounding box center in object-spriter.js

https://github.com/webaverse/app/blob/0f2afad7836158756627babdbe158722117f7ab9/util.js#L720

related: https://github.com/webaverse/app/issues/3501

related PR (No previews for bow bug) https://github.com/webaverse/bow/pull/11

Result:

https://user-images.githubusercontent.com/60634884/184770338-7ca9ec73-70b1-4933-b8c8-55d76dc09664.mp4

https://user-images.githubusercontent.com/60634884/184770370-47c47dae-30fb-4f4d-9d32-a2e76cd5ae29.mp4

https://user-images.githubusercontent.com/60634884/184770406-6bafe311-05ce-4276-aba3-806a57e44795.mp4

zenkale commented 1 year ago

Looks good to me. Dragon preview is working fine.

avaer commented 1 year ago

Also this should not be related to the dragon -- it should be a fix for all apps.

avaer commented 1 year ago

Merged upstream.