#lua cutscene camera scrolling

1 messages · Page 1 of 1 (latest)

cinder eagle
#

i have the line

coroutine.yield(celeste.CutsceneEntity.CameraTo(vector2(1050, -15), 7, monocle.Ease.CubeInOut))

this slowly pans the camera across the room, and then quickly snaps it back when its done. how do i make it not snap back, and instead, slowly scroll the camera back like it did on the way there?

#

function onBegin()
disableMovement()
coroutine.yield(celeste.CutsceneEntity.CameraTo(vector2(1050, -15), 7, monocle.Ease.CubeInOut))
--make the camera linger
setFlag("logo", true)
wait(4)
--make the camera go back slowly
setFlag("logo", false)

endCutscene()

end

#

i need to add the lines that are commented

#

or like

#

do something different

#

idk

#

thats why im here

#

and also i know nothing about coding stuff like this so please specifically point out how to implement your solution, with the exact code lines, unless you aren't sure yourself but you have a good idea? (i'm sorry i'm just kinda dumb)

cinder eagle
#

if there was a way to just update the camera position at the end of the CameraTo

#

that would prob solve my issues

sonic scaffold
#

couldn't you save the camera's x and y positions at the start of the cutscene, then do another CameraTo to pan back to there?

#

like

local return_pos = getLevel().Camera.Position
-- later...
coroutine.yield(celeste.CutsceneEntity.CameraTo(return_pos, 1, monocle.Ease.CubeInOut))
cinder eagle
sonic scaffold
#

yea, this code saves the original camera position (from the start of the cutscene), and pans back to it

cinder eagle
#

welp

#

it worked

#

yippeeeeeee

#

ty @sonic scaffold

cinder eagle
#

@sonic scaffold as thanks u get to see the cutscene 👀