-
Notifications
You must be signed in to change notification settings - Fork 117
feat(view): Add ability to rotate the camera in 45 degree increments using the numpad #1846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(view): Add ability to rotate the camera in 45 degree increments using the numpad #1846
Conversation
|
Use case:
Current outcome:
(Possible) expected outcome:
To do exact 45 step rotations in this PR, the camera needs to be reset first ( How do others look at this? +-45 degree rotating or 45 degree snapping? |
|
@Skyaero42 I considered the same thing. But you've already pointed out the solution: In the (probably rare?) situation the user unintentionally rotates the camera e.g. 20 degrees while intending their camera to be in direct 45 degree angles, they can easily reset the orientation by using I would estimate changing the behaviour from 45 degree increments to 45 degree snapping would add quite a bit of complexity in comparison to the relatively simple current approach. As a solution exists for the offset use case (and the feature is unlikely to see much use), I opted for simplicity. |
|
I did not expect it to be implemented for numpad buttons, but mouse3 (middle mouse button). When holding that button and moving the mouse, the camera rotates. |
Is that a problem? |
Not per se, but I would have expected implementation for that to be similar to the building placement and easier to do. |
I actually found this approach easier to do. I did attempt it with the mouse initially, but it felt very awkward and the solution of tracking the mouse delta as stateful data separately to the camera rotation did not feel as clean. |
I had another go and managed to get it working correctly. See #1848. |
GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
Outdated
Show resolved
Hide resolved
GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp
Outdated
Show resolved
Hide resolved
2db1e5a to
e581044
Compare
Merge after #1854
This change adds the ability to rotate the camera in 45 degree increments by holding the
CTRLmodifier key when rotating the camera via theNumPad4andNumPad6keys.ROTATE.mp4