pmndrs / ecctrl

🕹️ A floating rigibody character controller
MIT License
465 stars 49 forks source link

Mobile version spins the character model when zooming in #36

Closed SadmanYasar closed 2 months ago

SadmanYasar commented 3 months ago

The repo: https://github.com/SadmanYasar/portfolio_2024 Site: https://portfolio-2024-mauve.vercel.app/

On desktop it works fine but on mobile version, the model starts to shake and spins uncontrollably if I zoom in even a little bit. The configs are somewhat default except the physics timestep is set to "vary" and the plane (a boxgeometry) has ccd enabled. I have tried tweaking these settings but still the same issue. What could be causing this?

ErdongChen-Andrew commented 3 months ago

🤔 Not sure, your website works fine on my mobile

SadmanYasar commented 3 months ago

🤔 Not sure, your website works fine on my mobile

Tried it on another phone and it works as expected (Xiaomi Redmi Note 8 Pro). But surprised it runs smoothly on a 5 year old phone but not on a new one (Xiaomi Redmi Note 12).

Here are the demos on both phones running on same version of Chrome browser with hardware acceleration on:

Redmi Note 8 Pro: https://github.com/pmndrs/ecctrl/assets/67522140/816248c7-984f-4838-a467-4780f4e67b57

Redmi Note 12: https://github.com/pmndrs/ecctrl/assets/67522140/fe334c06-c117-40d3-ba0b-73a4b6e6684b

ErdongChen-Andrew commented 3 months ago

First time seeing this issue 😅. Maybe play with these values see if you can get a better result?

截屏2024-03-14 16 42 47
SadmanYasar commented 2 months ago

Closing this as I think this issue happened due to low FPS.