Forum rules - please read before posting.

Movement Nodes set up?

edited January 13 in Technical Q&A

Hi all-
I'm trying to make a first person point-and-click (similar to Nancy Drew style games, in 3D), and using the Movement Nodes template, but a little confused on how it works (I'm still pretty new to Unity as a whole). I'm trying to figure out how to set the movement up.

I want to be able to have forward, left, right, and backwards arrows to go in these directions (forward going forward, left facing left, so on and so forth). In game, I would want the left side of the screen to trigger the 'left cursor' cursor, and the player would be able to then face left, and same with right cursor and backwards cursor. When I'm trying to do this, it's not showing the different cursors, or that it can turn left/right/backwards, only to the node in front of it. I'm only able to turn using the manual settings in the inspector to turn right/left/backwards, etc.

I'm also curious if I should be doing the movement nodes or the interactive movement nodes. Should interactive movement nodes be left to actual interactive items (such as viewing a book/adding a book to inventory, talking, etc), or should I be using these as movement nodes?

Thanks so much, I have learned so much by using AC btw:)

edit: also for movement, should I change it from point-and-click to a different movement style? Thanks

Comments

  • Welcome to the community, @freekygirl.

    Have you tried out the package's FirstPersonExample scene? You'll need to have the MovementNodes set of Managers assigned for it to work as intended - which you can do by double-clicking the MovementNodes_ManagerPackage asset file before opening the scene.

    This sounds like a two-part problem: getting the nodes themselves set up, and creating the UI to navigate them.

    The ability to switch node / direction is tied to the button in the node Inspectors - so if you're unable to turn as intended using those, then the UI similarly won't work. It's best to sort that out before adding the UI elements needed to navigate in-game.

    For the nodes in the scene, turning left and right is a case of adding multiple Directions that each have a unique Spin angle. A character that occupies a node will be able to switch Direction based on their current facing angle.

    Have a look through the example scene to see if it's doing anything differently to your own, but if you'd like to share links to screenshots of your own scene/setup here, I'll see if I can spot anything amiss.

    So far as Hotspots go, you can move the Player to a specific node as part of a Hotspot interaction using the Character: Movement node Action. If you don't have this, you'll need to either rely on the MovementNodes set of Managers, or install this in the Actions Manager by pointing a new custom folder to /Assets/AdventureCreator/Downloads/Movement nodes/Scripts/Actions.

  • Hey Chris, thank you for your response!! When looking at the FirstPersonExample, I tried to walk through the game and it wouldn't allow me- I kept getting this error message over and over "InvalidOperationException: You are trying to read Input using the UnityEngine. Input class, but you have switched active Input handling to Input System package in Player Settings." Thanks for all your help

  • edited January 14

    Okay, I got it to work by changing the Input System to 'both', however I still have some questions. I want my game to include a "back" button that will just have the player turning from complete front to complete back (so, 'turn backwards' instead of 'move backwards'). Is this possible using the movement node pack?

    Secondly, I would like for the user to, instead of having the menu in the corner that has the turn options, be able to hover over the right/left/bottom sides of their screen, have the cursors change to right/left/backwards cursors, and move that way. Is this possible as well in this set up, or should I build individual hotspots? And how can I go in and change out the provided cursors for my custom ones?

    Also, I don't want to have a walking animation, do I change this in the Actions list? And will my player automatically snap to be in this type of point and click style, although under movement in the settings, its set to first person?

    Sorry, I know I have a lot of questions so I really appreciate you getting back to me!!:)

  • "InvalidOperationException: You are trying to read Input using the UnityEngine. Input class, but you have switched active Input handling to Input System package in Player Settings."

    If you're using Input System for input handling, you'll need to install AC's integration for it from the New Game Wizard's Templates page.

    The example package won't have this, however, so setting handling to "Both" is a good temporary workaround.

    I want my game to include a "back" button that will just have the player turning from complete front to complete back (so, 'turn backwards' instead of 'move backwards'). Is this possible using the movement node pack?

    Good idea! I've just updated the package with a "Turn Around" option for the Character: Movement node Action.

    I would like for the user to, instead of having the menu in the corner that has the turn options, be able to hover over the right/left/bottom sides of their screen, have the cursors change to right/left/backwards cursors, and move that way.

    You can do this by creating individual Menus - one for each edge, and then giving them Buttons that run the Charcter: Movement node Action to turn in the intended direction.

    The example's Navigation menu does this but in one Menu. You'd need separate Menus for each direction if they're each on the screen edges, to ensure that clicking inside the screen inside them still works.

    To change the cursor when over a Button element, check Change cursor on hover? in the element's Properties panel. The list of available cursors are defined in the Cursor Manager's "Interaction icons" section.

    Also, I don't want to have a walking animation, do I change this in the Actions list? And will my player automatically snap to be in this type of point and click style, although under movement in the settings, its set to first person?

    You can remove head-bobbing in the First Person camera component. Snapping is a case of checking Is instant? in the Charcter: Movement node Action.

  • edited January 16

    Chris- THANK YOU SO MUCH!!!!!!!

    Also, the 'change cursor on hover' doesn't seem to be working, but it might be something else I'm overlooking, although I'm able to direct myself around without it.

  • You're welcome!

    What's your Cursor Manager's "Cursor rendering" set to? That can affect how the cursor changes. Again, I'm another set of eyes if you'd like to share screenshots.

  • Thanks Chris, I got it working by changing the cursor rendering settings! Appreciate all your help!

  • edited January 19

    Hi @ChrisIceBox , also wanted to ask if using movement nodes changes the way you interact with hotspots. I was trying to make a door hotspot, and it doesn't seem to be working and I was wondering if thats because of the way I have movement set up. I'm curious how this would work with the interactive movement nodes. Here's some images of my current settings (for context, I'm trying to have the player click on a door handle, hear a door opening sound, and be immediately transported into the next room) thanks!

    https://drive.google.com/file/d/1wxqFY07Ctvru-6YBL7nN2pris9hQMNGh/view?usp=sharing

    https://drive.google.com/file/d/17v8dQDZQoNR911QN7_bbMmscworHuHE-/view?usp=sharing

    https://drive.google.com/file/d/1OZDcr9Lg4mv5T0hxpGxqUhd5rXxojDJf/view?usp=sharing

  • At what point does the interaction not work? Does the Hotspot name show up when hovered over? There are a few points at which the sequence of events involved can interrupt.

    A couple of things to try, to help determine at which point the flow gets interrupted:

    • Click the Run now button at the top of your Interaction ActionList to see if it runs correctly when run manually
    • Change the Hotspot's Player action field from Walk To Marker to Do Nothing to see if it's an issue with the Player's initial movement
    • Click the "Run now" button" in the Hotspot Inspector to see if it's an input issue

    Check also the Console window - do any related messages/warning appear?

  • edited January 19

    the hotspot isn't showing up whatsoever when hovered over the handle, the cursor doesn't change and no action happens. When I press the run now button in the ActionList, it works, and when I change the player action it still wont show. I clicked the run now button in the hotspot inspector and it didn't work either, and I don't have any messages in the console window. But also, I'm following your door interaction tutorial although I skipped after the ActionsList part as I'm doing something differently, but I'm NOT using the Interactable Movement Nodes, so I'm wondering if thats the issue.

  • Can you share uncropped screenshots of your Settings Manager, Menu Manager, and the Hotspot? That'll give me a better understanding of your setup.

    The Movement Nodes package's example Menu Manager only includes a single "Navigation" menu to move around using nodes. It doesn't include the regular Menus that appears as part of AC's default interface. If your Menu Manager only includes Navigation, you can copy it into another Menu Manager that includes the others to use them all together. The New Game Wizard will have created a set of Managers that you can use.

  • There might be a combination of factors at play here, but the use of the example's Menu Manager is the main issue I'm seeing.

    Did you previously use the New Game Wizard to create your own set of Managers? They'll be what you want to be using for your own game, rather than the Movement Nodes set. Copy the Navigation menu into your own Menu Manager asset file, and you'll have access to it in your own game.

  • I did, and when I had the movement nodes set it got rid of everything and replaced with Navigation and Hotspot. I did as you said, and its still not showing up- The other properties are currently set to what they are on default, here's what the hotspot menu and 'use' interaction menu look like:

    https://drive.google.com/file/d/1ebAWdETh3ZAXP2_pRhZi-IX_nt0Gtmqz/view?usp=sharing

    https://drive.google.com/file/d/1hkOWRtNa0Cjmr2Gl8FyKZKccvJhKmBOS/view?usp=sharing

  • edited January 21

    I'm afraid I'm not seeing enough from your screenshots to diagnose the issue.

    If you can .zip up your project (leave out the Library and Logs folders), PM it to me with instructions on how to recreate the problem and I'll take a look.

  • Thanks for the files.

    The issue is that your modified Navigation menu now spans the full screen, which prevents clicks underneath regardless of element positioning.

    To avoid this, you'll need to separate your Navigation buttons to separate Menus so that the empty space in between them is clickable.

    By default, the Navigation buttons are hidden when not currently useable, but this doesn't affect the Menu and so clicks over them still won't be registered in the scene. This is why clicking the Hotspot has no effect despite the "Forward" button not showing.

    In addition to splitting your 4 navigation menus into 4 separate menus, you'll also need to update the included MovementNode script to have it turn off the Menus themselves, instead of just hiding the navigation buttons, when not used. This'll allow clicks to become registered in the scene over the same space.

    To do this, name your Menus Navigation_Forward, Navigation_Left, Navigation_Right and Navigation_Backward and replace the MovementNode script's UpdateNavigationMenus function with the following:

    private void UpdateNavigationMenu ()
    {
        var leftMenu = PlayerMenus.GetMenuWithName ("Navigation_Left");
        if (leftMenu != null)
        {
            leftMenu.isLocked = !MovementNode.PlayerNode.CanTurnLeft;
            if (leftMenu.isLocked) leftMenu.ForceOff();
        }
    
        var rightMenu = PlayerMenus.GetMenuWithName ("Navigation_Right");
        if (rightMenu != null)
        {
            rightMenu.isLocked = !MovementNode.PlayerNode.CanTurnRight;
            if (rightMenu.isLocked) rightMenu.ForceOff();
        }
    
        var forwardMenu = PlayerMenus.GetMenuWithName ("Navigation_Forward");
        if (forwardMenu != null)
        {
            forwardMenu.isLocked = !MovementNode.PlayerNode.CanMoveForward;
            if (forwardMenu.isLocked) forwardMenu.ForceOff();
        }
    
        var backMenu = PlayerMenus.GetMenuWithName ("Navigation_Backward");
        if (backMenu != null)
        {
            backMenu.isLocked = !MovementNode.PlayerNode.CanMoveBackward;
            if (backMenu.isLocked) backMenu.ForceOff();
        }
    }
    
  • Chris, you are genuinely a life saver. Seriously cannot thank you enough!!!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.