edited June 2022 in ORK Support
Hey Friends -

**edit figured part of this out - different question:

So I have Cinemachine up and running - but if I change party members (change the main player) - my Cinemachine VCAM become static as it loses my follow and look at target initially assigned by @gamingislove ORK_Cinemachine_CameraControlWrapper - is there something I need to do to update look at and follow in my VCAM on player change?

Thanks!
Post edited by theProject on
  • edited June 2022
    I fixed it in a hacky way, by forcing the initialChange bool in the wrapper to false when enabling position and rotation on Enable. This forces the script to perform the initial change again via the override and now I can switch my party leader and the vcam continues to follow whoever is the leader. To clarify for anyone else - after setting up Cinemachine and using @gamingislove Wrapper script, everything worked great until I changed the "player character" - as once I did the camera would simply stay locked in place and no longer follow the player.

    Here is what the wrapper looks like - does it look good and future proof or will it cause headaches doing it how I did?



    if(this.cameraControl != null)
    {
    this.cameraControl.enabled = true;
    // this is the only edit I made to force script to go through the initialChange again, as this only runs when menu is pulled up
    this.initialChange = false;
    }
    if(this.hideCursor)
    {
    Cursor.lockState = CursorLockMode.Locked;
    }
    }

    Post edited by theProject on
  • I’m also at loss for this now. Does every camera function in ORK now require special stuff to make the events etc that ORK would do with the buoy in system?
  • Is your custom control (the Cinemachine wrapper) registered with ORK? This needs to be set up in Base/Control > Game Controls like any other custom control.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @gamingislove - I do - followed all your tutorials on it. It's just odd as the wrapper for Cinemachine you wrote works, but only when first loading the scene. If you change characters (new party lead) - again only using the 3D RPG Playground - the camera would lose follow and look at targets. Thats what I resolved in your wrapper, just dont know if its the best way.

    But by using Cinemachine, does that mean you lose all the 3d RPG Playground camera shots for battle etc, needing schematics for every camera driven event, or does it play well with the rest of ORK/Mak - thanks!
  • Hm, I'll check it out - how are you changing the player, via a Group menu or using the player change keys (or other means)?

    As for the camera shots in battle, the 3D RPG Playground tutorial blocks the camera control for that, i.e. as long as your custom control is registered with ORK/Makinom, it'll be blocked (i.e. the component is disabled) and allow the camera nodes to do camera changes.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @gamingislove - so I am still running your 3D RPG Playground Demo. Hacking it up to see how things work etc. I put a ton of debug.log into your CinemachineWrapper, and noticed it doesn't recognize when you change targets. If you look at your code, you have the parameters oldTarget and newTarget commented out, and never have a method that uses oldTarget? Thats the only thing I see that could be causing it. I simply changed the bool intialChange to false when view is re-enabled in the wrapper to force it to check for anew target again. Doesn't seem to hurt and it works.

    Last thing, and I swear I'll leave you alone for a couple weeks again hahaha, can you point me to how to setup a simple cutscene. Like a schematic to use, or a quick walkthrough? I see the cinemachine ways out there, but this needs to be driven by Makinom right? Thanks for helping this rookie out!
  • The cinemachine wrapper script doesn't have the CameraTargetChanged function with old/new target commented out.

    When going with cinemachine, you can just enable/disable the virtual cameras in your scene via the schematic handling your cutscene.
    Or, block the camera control during cutscene and use camera positions in Makinom instead, or move the camera like any other game object :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @gamingislove - could you give me an example of a couple nodes I’d use to disable the main camera, and flip to the virtual cam of Cinemachine? I haven’t found a node to switch the camera and just looking for an example of which nodes to use. That and the node used to play a blender tree animation for walking, so I can use the Move node… all for the cutscene we’ve been talking about. Thanks!
  • You simply need to enable/disable game objects of your virtual cameras using an Activate Object node to switch between cameras in Cinemachine. I think simply enabling the next virtual camera should switch to it.

    If your animator handles walking animations via blend tree, make sure to move at a low enough speed to have the walking animation playing.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.