edited August 2017 in Makinom Support
I'm having a bit of a problem. I am testing with the third person camera view. As a quick test, I am using the ork's default camera control mouse type. For the first test I used the ork's default player controller of type button, with Use Camera Direction enabled. Upon play, everything works fine. When I press forward, the player will turn towards the camera direction and will go that way.

I then create a makinom schematic with just one move node.
The node is as follow:
X axis set to Horizontal
Y set to none
Z set to Vertical
Use Camera Direction enabled
Face Direction enabled

But upon play, when I press forward, the player will only go the same direction no matter what camera direction it is in.
I tried enabled local space, but that doesnt work too. Do you know what I did wrong?

I feel like I asked this before, but I couldn't find it, so maybe it was just my imagination.
Post edited by Shadow_Fire on
  • Is your camera tagged as the main camera, or is your schematic using a different camera (defined in the Settings node)?
    If the schematic can't find the camera, there's no camera based direction possible :)
    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 July 2017
    Haha yah I suffered from the same mistake as the last one. Just that this time in the setting node, I disabled the use main camera. Not sure when I did that, but haha thank you :)

    A follow up question. How do you rotate the player to the direction he is moving? I enabled the Face Direction, but that didnt do anything. Is the Face Direction in the move node broken? Cause when I enabled it, whenever I go a certain way, the player doesn't turn until I stop moving and let go of the movement key. At that moment only will the player rotate instantly to that direction.

    Edit: Yeah I got it to work by going into the rigidbody of the player, disabling the isKinematic, and enabling all the constraints. I'm curious, why do I need to do this for it to work? :)

    Also, using the move node, what do I have to do to rotate the player smoothly? Right now he just turn instantly straight to the direction. (I also feel like I ask this before, maybe it was just my imagination again)
    Post edited by Shadow_Fire on
  • It really depends on your setup, e.g. what component is used to move your game object. If the rigidbody is used for movement, Is Kinematic might work against that.

    There are various rotation nodes available for this task - for a smooth result you'll always have to separate movement from rotation, as Face Direction will hard-set the rotation to whatever movement vector used.
    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!
  • Like this?

    Setting - move node - rotate node?

    In the rotate node, how do you make the character turn in the direction he's moving? I thought it would be vector3 type Direction, but I was wrong. :)
  • Generally, yes - but it only gets more complex from here :D

    What you need to do is separate the input and move direction stuff from the move node to have the direction also available for the rotation node. Lucky for you, there's the Directional Joystick Input node, where you can store joystick input (horizontal+vertical) based on the direction of a game object (e.g. the camera) into a Vector3 variable.
    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 July 2017
    Gil, if you can, can you give me a more visualize approach (aka explain it more), so I can wrap my head around this?

    Here is the images of what I have, but I have a feeling that it is more complicated than this, based on what you said :D

    http://imgur.com/a/YiTGw
    Post edited by Shadow_Fire on
  • edited July 2017
    You'll have to do it like this:
    1) Use a Directional Joystick Input node to store the player's input into a Vector3 variable.
    2) Move using the stored input (Vector3 variable).
    3) Rotate using the stored input (Vector3 variable).

    Keep in mind that the stored input is in fact the movement direction in camera space :)
    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!
  • I'll keep that in mind. :)
    I feel like I'm getting closer to solving this, just need something.
    I got number 1 and 2 to work. But when I used the store vector3 variable from the directional joystick input node in the rotate node as the rotation change vector3 type, it did not make the player rotate. Well, it did in a way. If I disabled the lock rotation X and Z, when I move, the player just spins around and around, feet first, head first, etc, doing all kind of flips :)
    Enabling lock rotation X and Z will make the player not rotate in any way.

    http://imgur.com/a/fA62f


  • edited July 2017
    Sorry, my bad, there currently is no direction based rotation in one go. You can do the following (after move, before rotation):
    - use a Change Variables node and add the machine object's position to the input variable (this will get you a position the player is currently moving to)
    - use a Rotate To node to rotate the machine object to the input variable (i.e. rotating to the position the player moves to)

    You'll also want to use an Input Key node to check if horizontal/vertical input happened at the start of the schematic before doing all this :)

    Also, you should change the variable origin to Local, since this is only used in the running schematic.
    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!
  • My set up

    http://imgur.com/a/pvvl6

    Since you already saw my previous nodes, Im just going to show you the change variables and the rotate to node.

    My directional joystick input's variable is different from the Change Variable node. I even tried making them the same.

    Am I missing something again? :)

  • edited August 2017
    I've uploaded a sample schematic here. Probably easier that way :)
    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 August 2017
    GiL, the sample schematic is blank and this message pops up in the console :)

    Removed null node at index 0.
    This can be the result of a custom node script that has been removed from the project.
    Saving the schematic will also save removing the node.
    UnityEngine.Debug:LogWarning(Object)
    Makinom.Editor.SchematicsTab:DoChecks()
    Makinom.Editor.SchematicsTab:LoadFile(MakinomSchematicAsset, Schematic)
    Makinom.Editor.SchematicsSection:LoadFile(MakinomSchematicAsset, Schematic)
    Makinom.Editor.SchematicsSection:ShowSchematicSelection(Boolean)
    Makinom.Editor.SchematicsSection:ShowSchematicEditor(Int32&)
    Makinom.Editor.MakinomEditorWindow:OnGUI()
    UnityEditor.DockArea:OnGUI()
    Post edited by Shadow_Fire on
  • Sorry, my bad - that's a change coming in the next version :)
    I've updated the schematic to work with the current release version.
    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!
  • It works! Aha, I'm so embarrassed, to have to force you to finally create a sample schematic for me. No words to describe my thanks, but thanks a lot!
Sign In or Register to comment.