Hi all, I'm working on a project combining Ork and Makinom, although this should be a Makinom-specific question; I have a 3rd person Isometric-ish camera system that's working pretty well:

Smooth Follow on the Player, with the Position Offset set to be a Local Variable that I've just called 'CamPos'. Then, in the Tick Machine I have this schematic running with my Local Start Variables set to a vector3 Value with my preferred offset. Works great!

Now, what I would like to do is have certain trigger volumes set up (hopefully prefabbed in some way) where the player enters and I can set the CamPos value to zoom the camera out a bit, etc. I've set up a box collider trigger machine and tried a whole variety of ways to get some different values across to that variable, none of which seem to work.

Do any of you know what the best way to set this up would be? Thanks in advance. :)
  • edited January 2016
    If a variable should be influenced by other machines/schematics, it's better to use either Object variables or Global variables. The local variables (which start variables are) are only available and accessible in the running schematic and can't be changed directly by other machines.

    Since it's the camera (i.e. you'll most likely only have one of them at a time), you should be able to just use global variables. Read the how-to on variables for more information on the different variable origins.
    Post edited by gamingislove on
    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!
  • edited January 2016
    Great, thank you for the quick response! The link was very informative, can't believe I missed that one.

    I found the spot where I can set the initial variable under Makinom -> Game -> Initial Variables. Trigger has a "change variable schematic, and the camera zoomed out to its new position.

    Now, is there a way I can make it so upon leaving the trigger, the CamPos variable returns to its initial variable?
    Post edited by StarCross137 on
  • Sure - add a Trigger Machine with Trigger Exit start type enabled, setting the variable to whatever value you want :)
    If you want it to reset to whatever value was used befor entering the trigger, you could e.g. store the previous variable value into another variable in the enter machine and use that variable to reset the used variable's value in the exit machine.
    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!
  • Oh that's a great idea, I didn't even think to add another machine to the same object... learning how all these scripts work and how to solve these problems is really making me use my brain in unfamiliar ways.

    Thank you for the great support, I will probably be pestering you a lot while I get all my systems set up. Cheers buddy
  • edited January 2016
    Okay, that worked perfect. I've got my volumes set up and the camera is smoothly zooming in and out by way of the CamPos and CamPosReset variables and the 2 trigger machines. Those variables are fed into the Smooth Follow node of my CameraFollow tick machine schematic that is attached to the camera.

    One last question: I would like to also have slight rotation changes happening as well with these triggered events, IE the camera smoothly pans up to a higher orientation when entering a larger area (using the Smooth Follow node), while panning up it tilts slightly downward for a more "top-down" view of things.

    I've tried adding just about every rotation type of node to my CameraFollow schematic, and have set up a similar variable swap as I did with the position; using CamRot and CamRotReset variables. The Change Rotation node seems to work, but the rotation is a jarring snap to the new values. I've tried using the fade rotation checkbox, but then the camera wigs out and points straight down. Similar results using the Rotate node with a Rotation Speed value. I feel like there's something simple that I'm missing, or maybe a different type of machine to handle the rotation? Any ideas? Thanks again. :)

    Edit: I've also tried messing with the rotation offsets in the Smooth Follow, but those seem to only effect the position relative to the Player object that the camera is following. Is that correct?
    Post edited by StarCross137 on
  • I'd need to know/see your camera control to give a better advice here.

    Generally, if you're using a Rotate To node after the Smooth Follow to make the camera look at the player, you'd just need to change the offset to move it nearer over the player (i.e. X/Z offset).
    Otherwise, the Change Rotation node would be the way to go, rotating on the X-axis of the camera. The Interpolate options might be the best way to do this, e.g. with an Ease In Out Quad interpolation.
    The Rotate node is for rotating per tick and not really useful for one time 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!
  • Okay, here's all the schematics I'm using on my camera.

    CameraFollow - Attached to a tick machine on the GameCamera object (the Main Camera is a child of this object). The Rotate To node that's not hooked up in this schematic is the one that I'm using in the meantime, until I can get that Change Rotation node working.

    CameraWaver - A schematic I still haven't gotten working that I was going to attach to the Main Camera object to try and simulate a subtle secondary hand-held motion. Unused at the moment.

    CamPosHangar - The schematic that is fired on Trigger Enter by the box trigger to change the GameCamera's position/rotation.

    CamPosReset - The Trigger Exit schematic to return the camera to its original state.


    The initial CamPos and CamRot variables.
    image

    The GameCamera heirarchy.
    image

    The GameCamera tick machine.
    image

    So, if you hook that CameraFollow schematic up to an object with those fade settings in the Change Rotation node, the camera just slowly points straight down instead of using the CamRot values. However, if you turn off the fade checkbox, it behaves fine and will snap to the new values when they're fed in by the trigger machine. Just no smoothing on the rotation, which is a bummer. Help me Gil Kenobi, you're my only hope!
  • Well, without looking at your schematics - the Change Rotation would need to happen in the schematics of the trigger machines.
    I.e. on trigger enter rotate it down, on trigger exit rotate it up.
    If you have the Change Rotation node in the CameraFollow schematic, this just happens all the time (since that's the actual camera control, starting every frame).
    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!
  • Ah nice, that worked really good. Thanks a bunch man, appreciate all the help.
  • Alright I have one more question about the Change Rotation node that I'm firing off from the trigger volume: is there a way to make vector3 value an absolute rotation? Right now, no matter what I do it will only do a relative change.

    Example: The camera's X rotation is 55, and I want to make it 50. The only way to do that is to use the value -5.

    Which works for the most part, but I've come across a bug where if I enter and exit the trigger volume before the camera has finished rotating, it starts getting offset further and further. But if it always had a set absolute value to rotate to, it would be fine.

    I've tried turning on local rotation, using "set axis" etc, nothing seems to change the behavior. Am I missing something?
  • Yeah - that'll come in the next update, just noticed that this is missing in ORK as well when someone pointed that out :)
    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!
  • Right on man, glad it's just a bug and not me being an idiot ;)
Sign In or Register to comment.