Search Unity

Question Wanting to create seamless cutscenes with a framework but having trouble with the Player Object.

Discussion in 'Editor & General Support' started by FeldIV, Jan 19, 2023.

  1. FeldIV

    FeldIV

    Joined:
    Dec 16, 2018
    Posts:
    27
    Hello all, I'm using Unity and the RPG framework, Ork to make a game and it's going well; I love the engine and the framework.
    What I'm trying to do is implement a seamless transition from cutscene to gameplay, whether its returning control to the player, or a battle. You can see this in a lot of games; the first example is a seamless transition from cutscene to a battle from Lost Odyssey.




    In both of these examples, the 'player' object in the cutscene is the same object that transitions cleanly into the battle/player control. It bears mentioning that if you've played either if these games before, the gif doesn't capture the totality of what's happening; these aren't merely just a couple of simple camera pans for a couple of seconds before the transition, they're full blown, minutes long cinematics that seamlessly transfer control to the player without missing a beat or a camera cut.

    Theoretically, the PlayableDirector/Timeline component in Unity seems to be the cleanest, most efficient way to do this, however, in order for Timeline to work, it needs to be fed the object that its doing stuff with, in below, the empty Animator block. In my case this would normally be the Player Object, however in Ork, the player object is generated after the scene starts.




    Normally I know that the way to make cutscenes (that a lot of AAA games also do) would be have a game object that looks like the Player Object as a stand in and hide the actual Player Object and swap them once the cutscene ends, but obviously to make a seamless cutscene this wouldn't fly.
    In the topic above I was given this advice in regards to the above by the creator of the asset.


    Code (CSharp):
    1. GameObject player = ORK.Game.GetPlayer();

    For a novice like me, this just looks like a snippet of code without any context or information on where to put it or what it does (I know it 'gets' the player object, but what does that mean in practical, regular, 'pretend I don't know anything about code' English?)

    -Where (What GameObject/Component/etc) do I put that line of code?
    -When and how do I call it?
    -In the context of what I'm trying to achieve above, what does it do?
    -After all this, what do I do with the Spawn Point? Have the player Spawn where it can't be seen, turn it on after the cutscene with code, or disable it entirely?


    I know this is a lot, but thank you!