Ticket #56 (closed task: fixed)
Camera - Cinematics
| Reported by: | stuart | Owned by: | markelov |
|---|---|---|---|
| Priority: | Should Have | Milestone: | |
| Component: | Core engine | Keywords: | review |
| Cc: |
Description
- Key to lock camera on the selected unit ("follow" mode).
- Bugfix: camera shakes when unit being followed goes downhill away from camera.
- Cinematics: functions to control camera and define tracks at positions in the environment.
- Option to lock camera rotation or "snap" to saved rotation.
Attachments
Change History
comment:2 Changed 3 years ago by markelov
camera following mode patch is attached. The following mode works like this:
- user selects a group of units or a single unit
- user presses F key at run-time
camera is now in the following mode. If the user moves the unit pressing right mouse button, the camera will follow the unit. The user may rotate right and left, up and down - all the rotations will be around the unit.
While camera is in following mode, it is not allowed to move the camera neither by arrow keys nor by mouse.
If the user selects another group or another single unit and presses F key, camera will stop following the previous unit and will start following the unit just selected.
If the user selects a non unit entity, or empty place - so no selection will be applied, and presses F key, camera will stop the following mode. It will stop following the unit if the user presses F key while the same unit or group is selected.
comment:3 Changed 3 years ago by markelov
- Summary changed from Camera - Cinematics to review Camera - Cinematics
comment:4 Changed 3 years ago by fcxSanya
- Keywords review added
- Summary changed from review Camera - Cinematics to Camera - Cinematics
comment:5 Changed 3 years ago by Philip
Thanks for this - will apply with some changes. (The other points in this ticket seem to be basically fixed already so this doesn't need to be kept open.)
I don't like requiring that the player press 'F' to get out of follow mode: they might start following a unit accidentally (maybe they meant to press 'D' and their finger slipped), and then it's not obvious how to get out of follow mode, so they'll be stuck until they exit the game. I think it's better for the camera movement controls to stop the follow mode (instead of being ignored entirely), so that it's easy to get out.
The GUI hotkeys don't need to use performCommand (that's just used for the delete hotkey since it's shared with the on-screen command button), so I moved that to a separate function. Since following mode is disabled by moving the camera, and pressing 'F' again should re-follow, I simplified it to not use the global followingEntity.
CGameView and CSimulation2 shouldn't have new member variables, they should go in the m since it's doing the pimpl idiom.
