Ticket #588 (closed enhancement: fixed)
Key Rotation when building construction is selected
| Reported by: | k776 | Owned by: | k776 |
|---|---|---|---|
| Priority: | Nice to Have | Milestone: | Alpha 2 |
| Component: | Core engine | Keywords: | |
| Cc: |
Description
Using the mouse to rotate produces unexpected results and makes wall/gate building much harder. It would be nice to have the 'q' rotate 45 degrees anti-clockwise, and the 'w' key rotate 45 degrees clockwise, when a building is selected for construction.
I'm going to attempt to write a patch in my free time, but if it hasn't been done yet, please go ahead and do this yourself. From what I understand, it should be very easy.
Attachments
Change History
comment:1 Changed 3 years ago by wacko
- Owner set to k776
- Priority changed from major to minor
- Milestone changed from Unclassified to OS Alpha 2
comment:2 Changed 3 years ago by k776
To implement this requires a new Hotkey system, where the actions for viewport rotate buttons Q & E can be overwritten/replaced.
comment:3 Changed 3 years ago by Philip
I'd suggest using different keys (regardless of technical limitations), like PageUp/PageDown or [/] perhaps, since it doesn't seem nice to disable some of the camera movement keys when the player is trying to look for a space to put their building in.
comment:4 Changed 3 years ago by Philip
Thanks! Just made a few modifications:
Changed the key definitions to be SDLK_ constants. Reused placementPosition instead of targetPosition since they don't need to be separate.
var rotation_step = Math.PI / 12; // 12 clicks make a full rotation
Actually 24 clicks, since there's 2*pi radians in a circle.

I am going to give this k776 and mark it as a minor task for now. If you can get it done by then do so but if not then we can push it.