Difference between revisions of "Camera Key Frames"

From Journey Modding Wiki
Jump to navigation Jump to search
m (please use pre instead of nowiki)
m
 
Line 1: Line 1:
[[Category:Level Objects]]
[[Category:Level Objects]]
{{Stub}}
Camera Key Frames are [[Level Objects]] that are used as specific locations for the camera to move to - like for cutscenes, or pause mode/screensaver scenes, etc.  
Camera Key Frames are [[Level Objects]] that are used as specific locations for the camera to move to - like for cutscenes, or pause mode/screensaver scenes, etc.  



Latest revision as of 15:06, 16 December 2021

Camera Key Frames are Level Objects that are used as specific locations for the camera to move to - like for cutscenes, or pause mode/screensaver scenes, etc.

They can have pan speed and direction built in, which makes the camera immediately pan that way whenever the camera is sent to that Camera Key Frame.


Each level's Camera Key Frames are loaded from its CameraKeyFrameInstances.lua file.


Here is modded code you can execute with Lua to make it easy to browse through all the Camera Key Frames in a level and identify them:

it turns them all into pause mode keyframes at the start of a level, let you switch from one keyframe to the next in pause mode by pushing the keys mapped to left/right, and shows the keyframe's order in CameraKeyFrameInstances.lua (for example, "Pausemode Keyframe #0" is the first object in CameraKeyFrameInstances.lua, "#1" is the second object, "#2" is the third object,etc)

Vars.Game.cheatsEnabled(true) --lets you switch slides with left/right movement keys
Vars.PauseSystem.displayDebugNum(true) --shows slide # on screen

function LoadCameraKeyFrames( cameraSys )
	for i, desc in ipairs( CameraKeyFrameInstances ) do
		desc.AllowInPauseMode = true --mod that makes all CKF's into screensaver keyframes
		local camKey = cameraSys:AllocateCameraKey()
		CameraKeyFrameInitialize( cameraSys, camKey, desc )

		-- Now triggers can refer to gardener-placed camera keyframes
		Names[ desc.ObjectName ] = camKey 
	end

    CameraKeyFrameInstances = {} 
end