kCamera
cutscene camera
stored in global var Camera
Variables
kVec3 origin
kAngle yaw, pitch, roll
float fov
float lookZOffset
Methods
void StartCinematic( uint flags = CMF_LOCK_PLAYER | CMF_UNLOCK_PLAYER_ON_FINISH )
- CMF_NO_INITIAL_FADEOUT – cut rather than fade to black (start at state 2)
- CMF_NO_LETTERBOX
- CMF_LOCK_PLAYER – lock the player as soon as the cutscene starts (state > 0)
- CMF_UNLOCK_PLAYER_ON_FINISH – unlock the player when state 5 begins
- CMF_INITIAL_FADEIN – fade from black and resume gameplay (start at state 5)
- CMF_SHOW_CREDITS – roll credits while cutscene is active
- CMF_CHANGE_MAP_AFTER_FADE
- CMF_SHOW_HIDDEN_OBJECTS – do not hide "non-cutscene" objects, like key pedistals
void StopCinematic()
int CinematicState()
- no cinematic
- transitioning in – fading to black
- transitioning in – fading from black
- playing
- transitioning out – fading to black
- transitioning out – fading from black
bool Active()
bool ViewingFromCamera()
returns true
if CinematicState()
is 2
, 3
, or 4
void SetLookAtActor( kActor@ a )
void ClearLookAtActor()
void SetRotateEyeVector( kVec3& v )
void SetFinalView( int i )
void ClearFinalView()
void SetRotationTrack( int trackID, float angle1, float angle2, float dist1, float dist2,
float height1 = 0, float height2 = 0, float lookHeight1 = 0, float lookHeight2 = 0 )
void SetPositionTrack( int trackID, kVec3& startPos, kVec3& endPos,
kVec3& startLookAt, kVec3& endLookAt )
void ClearViewTracks()
void TweenPositionTrack( int trackID, float time )
void TweenRotationTrack( int trackID, kVec3& v, float time )
void AutoPlayPositionTrack( int trackID, float time, int lerpType )
void AutoPlayRotationTrack( int trackID, float time, int lerpType )
void AutoPlayBlendTrack( int trackID, int blendTrack1ID, int blendTrack2ID,
float time, int lerpType )
- CMLT_NONE
- CMLT_LINEAR
- CMLT_LINEARLOOP
- CMLT_COSINE
- CMLT_COSINE_POW
void SetEyeView( kVec3& pos )
set camera position
void ZoomEyeViewToPosition( kVec3& v, float f )
kVec3 GetEyeView()
void SetFocusView( kVec3& lookAt )
set location camera should point at
void ZoomFocusViewToPosition( kVec3& v, float f )
kVec3 GetFocusView()
bool UserInterrupted()
returns true
if the player has tried to cancel the cutscene (e.g., pressed fire or escape key)