Plonq / bevy_panorbit_camera

A simple pan and orbit camera for the Bevy game engine
Apache License 2.0
186 stars 36 forks source link

cannot freely rotate around in vertical direction #6

Closed ybyygu closed 1 year ago

ybyygu commented 1 year ago

I'm using this crate for molecule visualization in my project and I find it very helpful. Thank you for creating it!

I've encountered an issue that's titled. When I rotate in horizontal direction, it seems to be okay. I'm not sure if it's a feature or a bug.

This can be reproduced in example basic:

cargo run --example basic

Plonq commented 1 year ago

Hi @ybyygu! Glad you find it useful.

If I understand correctly, you are saying that you can't make the camera go upside down. There is a configuration for this, called allow_upside_down, which is false by default. Setting this to true should solve your issue. The advanced example shows how to set this option.

Can you confirm if this works for you? If not, could you record a video of the issue?

ybyygu commented 1 year ago

I tried your solution with configuration allow_upside_down, but it is still not working as I expected.

Correction: It actually works!

When I repeatly rotate the molecule to the upside or the downside, the molecule cannot be rotated further. But if I rotate to the left or the right, it works.

Screencast from 2023-04-25 12-46-12.webm

ybyygu commented 1 year ago

Sorry, I just tried your advanced example. It works. I am trying to fix the issue in my codes.

ybyygu commented 1 year ago

This issue is solved if I set allow_upside_down to true. Thanks for your great work!

Plonq commented 1 year ago

Glad you got it working!