Opened 18 years ago

Closed 14 years ago

Last modified 8 years ago

#56 closed task (fixed)

Camera - Cinematics

Reported by: Stuart Walpole Owned by: Sergey
Priority: Should Have Milestone:
Component: Core engine Keywords:
Cc: Patch:

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 (1)

cameraFollowingMode.diff (12.3 KB ) - added by Sergey 14 years ago.
camera following mode

Download all attachments as: .zip

Change History (9)

comment:1 by Sergey, 14 years ago

Owner: set to Sergey
Status: newassigned

comment:2 by Sergey, 14 years ago

camera following mode patch is attached. The following mode works like this:

  1. user selects a group of units or a single unit
  2. 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.

by Sergey, 14 years ago

Attachment: cameraFollowingMode.diff added

camera following mode

comment:3 by Sergey, 14 years ago

Summary: Camera - Cinematicsreview Camera - Cinematics

comment:4 by fcxSanya, 14 years ago

Keywords: review added
Summary: review Camera - CinematicsCamera - Cinematics

comment:5 by Philip Taylor, 14 years ago

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.

comment:6 by Philip Taylor, 14 years ago

Resolution: fixed
Status: assignedclosed

(Hmm, fixed by r8190 but the automatic bug-closing thing didn't seem to work...)

comment:7 by (none), 14 years ago

Milestone: Environment Demo

Milestone Environment Demo deleted

comment:8 by sanderd17, 8 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.