Opened 14 years ago
Closed 14 years ago
#588 closed enhancement (fixed)
Key Rotation when building construction is selected
Reported by: | Kieran P | Owned by: | Kieran P |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 2 |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
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 (1)
Change History (6)
comment:1 by , 14 years ago
Milestone: | Unclassified → OS Alpha 2 |
---|---|
Owner: | set to |
Priority: | major → minor |
comment:2 by , 14 years ago
To implement this requires a new Hotkey system, where the actions for viewport rotate buttons Q & E can be overwritten/replaced.
comment:3 by , 14 years ago
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 by , 14 years ago
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.
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.