edited September 2016 in ORK Support
Hey gang,

I'm back with a new question. I would like to add a locked rotation to my non-battle camera. I would like to add or subtrack 90 degrees from this property when I hit the Left or Right Controller Trigger. http://prnt.sc/cmclxp , I'm just still confused how to access the globals / variables. Is there a place on the website that lists all the KeyNames for all of these? I'm not sure how to locate the proper names to overwrite.

Thanks ahead of time.
Post edited by Gregie on
  • That's currently not possible out of the box - you'll either have to change the script for the camera control, use a custom control or use the event system for that.

    E.g. when using the event system, use a Change Fields node to change the rotation field of the camera control:
    - component name: TopDownBorderCamera
    - object: camera (set up an actor that uses the Camera type)
    - add a field, name rotation, type float

    To add/sub 90 from the current rotation, you'll first have to get the rotation value using a Field To Variable node with similar setup.

    As for accessing the settings, that doesn't really help you here. The settings you set up in the editor are only used to initialize the camera control, the live values are only found on the control component on your camera.
    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!
  • Thank you! I will attempt to tap into it via the event system as you advised. I'll keep you posted :)
  • I'd recommend using global events (Game > Global Events) to set them up, they can e.g. be started using input keys.
    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 September 2016
    That's for checking in. So I got it to work using a "Field to Variable" ( http://prntscr.com/cn1g1g ) then a "Check Value" then "Change Value" (<- I renamed this in the screenshot)

    http://prntscr.com/cn1g1g

    But for some reason when I attempt to use a "Game Variable Fork" ( http://prntscr.com/cn1jhg ) instead, it can't compare the values. The only difference I see is that the "Check Value" doesn't ask for a specific type , such as string or float. I assume the data stored by the "Field to Variable" is a float since that's what the field is. But when attempting to check the variable using the "Game Variable Fork" using floats or even strings it does not work.

    Is there an way to cout/print out the variables during run time to better debug the event tree?


    Also, this may be a long shot, but do we have anything in the Event system for lerping? Currently the camera jumps instantly from one rotation to another.
    Post edited by Gregie on
  • edited September 2016
    The Value Type of the variable key should be set to Value. Currently you're trying to check a variable with a key that is stored in the variable Compass.

    Also, since you're dealing with float values, it's best to use the Approximately check - otherwise the check could fail due to float imprecision.

    Alternatively to the checks, you could just add/sub 90 degrees to the stored value and use the changed variable value to change the field :)

    I don't think ORK's event system has lerping nodes - you could use Makinom for that, it has a broad range of value manipulation nodes.
    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!
  • You are the MAN! GamingisLove.

    It totally works now http://spacepg.com/_dev/9-27-2016_ork.gif

    It was the combination of changing GameVariable to Value and the approximation vs IsEqual too.

    BTW, I was using it as a GameVariable since I have some text/canvases in game the I need to rotate based on camera angle. So that they are readable. I was hoping to use the GameVariable: Compass to orient their direction. If I use it as a Value will it still be accessible globally?


    (I have not gotten to the Grid Battles yet, but this sorta camera is usually used in FF Tactics, Disgaea and Fire Emblem so it will be very beneficial to that stage. )

    BTW, are you the developer? Sorry, if I'm a newb but at first I assumed you were a helpful community member :) But now I'm quite certain you are the brain behind ORK

    Thanks again.
  • edited September 2016
    Sorry :) one more follow up question since you mention that you can use the Change Fields to update the Field using the changed variable. I attempted this at first, but found that Change Filed only takes field types of (string float, bool...etc) it does not allow for populating the field with data from a variable. Was I using the wrong node for this purpose? http://prntscr.com/cn32cy
    Post edited by Gregie on
  • edited September 2016
    :) Final update http://spacepg.com/_dev/9-27-2016_ork2.gif

    I found the source code and made a modified version of your TopDownBorderCamera. Adding in a small Lerp functionality if you pass it a Bool via the Event system.
    Post edited by Gregie on
  • The Value Type setting of the variable key only defines where to get the key from. Value means you define the key there, Game Variable means that the key is stored in another game variable.
    This doesn't influence where the variable is available, because that's handled by the Variable Origin setting. You can learn more in this how-to.

    Sorry about the Change Field mistake - I forgot that they don't support complex float value selections. This is possible in Makinom, though.

    And yes, I'm the developer of ORK Framework :)
    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.