edited October 2022 in ORK Support
Hello, I have successfully gotten Cinemachine to link with Ork via the wrapper, and there's something I'm trying to figure out; having multiple Cameras in the scene that switch/activate when the player walks on a certain trigger on the scene.

Attached is an example from Final Fantasy X of what I mean; as you can see when Tidus walks on a certain point on the map, another camera takes over and switches to a different view. There's also something else I'd like to do; have the active camera move to another position (or another camera) with interpolation (I couldn't find an example of this in FFX, but I know it has it)

image

I've been trying to pull this off in Ork and I'm not sure how. I have two cameras on this scene; when the player walks through the passageway, another camera takes over. As you can see I've been trying things like tying the activation of the camera to the player walking on a Trigger to no avail.

image

Luckily below I can show you a finished version of exactly what I'd like to do. In a previous version of my project before I upgraded with Ork, I managed to pull this off with another framework I was working on.

Here's an example of this in action.

As you can see, there's a couple things going on here; when the player walks through a threshold;

-The active camera switches to a second camera with no interpolation (like the FFX example)

-This second camera follows the player for a time across the room.

-When the player hits the middle of that second room, the camera shifts to another position. I'm thinking this effect could also be achieved with a 3rd camera with some interpolation.



However like I mentioned before this is with a previous framework that no longer works, and I'd like to recreate those three points with Ork. Any tips or a play by play on how to achieve this?

Thank you!
Post edited by FeldFour on
  • If you're using Cinemachine as you mentioned, it should be pretty easy to work with if you've already got that hooked up into ORK.

    You can use a Trigger Machine that calls a schematic upon Enter disables (Camera Block will disable Cinemachine Brain if you're using the supplied wrapper so you don't want to do that) your normal Cinemachine Virtual Camera (Freelook, etc. whatever you're using as the camera) and enables the one for that area. The Cinemachine Brain will handle blending, and the new Virtual Camera can have it's own settings, such as a specific angle or static position.

    Then you'd use a Trigger Machine with an Exit schematic which disables that specific virtual camera and then re-enables your normal player camera. I believe you can have both Trigger Machines on the same object if you'd like, assuming they have different criteria and you don't disable the gameobject after running there shouldn't be a problem.

    If you don't want blending/interpolation, you can set specific Blends in the Cinemachine Brain between your player and that static virtual camera as well.

    Cinemachine is neat in that as long as the Brain component is active, just disabling and enabling various cinemachine cameras (having multiple enabled cinemachine cameras will bring the Priority value into play) it will automatically blend and adjust between them.
  • First off, thank you for your reply, I really appreciate it.

    So, if I'm understanding correctly, what I want to do is have a Trigger Machine set to Trigger Enter that calls up a Schematic that disables the currently active camera in favor to the one I want to switch to? More or less?

    Question about that; what's the best/most efficient way to disable a camera via a schematic (or at all for this purpose)? What kind of node do I use?
  • Correct, and then vice versa for exit and Cinemachine should handle the transitions for you.

    One way to do it is to add it as an Actor, and enter in the name as a child of the machine object to ensure you get the right one:

    image

    Then if you use the same naming for your cameras, you can reuse this schematic and machines as well.

    You can do something similar using an Actor Type of Find Object for your main player camera, but you'll want to make that a more unique name just to be sure you get the right thing.
  • Thanks for your help. So, which node deactivates objects? How do you do that most efficiently?
  • Activate object toggles the active status of an object (or you can use Enable Component if you just want to turn off the camera component) and then assuming you set up the actors like my earlier post you can just choose that Actor as the object for Activate Object or Enable Component node.
  • edited November 2022
    Thank you!

    Okay, I got it working; kinda!

    As you can see, it largely works! Except for the initial trigger, you can see the camera 'snap' to the player before it follows her. Strangely enough though, as you can see, when she goes back and forth through the corridor, the camera doesn't do it the second time around.
    Post edited by FeldFour on
  • That is odd, maybe it just needs a small wait inbetween (like 0.1 sec) to initialize the transition? You also might be able to get some pointers for Cinemachine stuff on the official Unity forum. They have a subforum for Cinemachine and the main dev is pretty active at replying to threads there too. They might know what's going on instead of my guesses haha
Sign In or Register to comment.