Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Input System in Visual Scripting

Discussion in 'Visual Scripting' started by RimTobbins, Apr 14, 2022.

  1. RimTobbins

    RimTobbins

    Joined:
    Apr 9, 2022
    Posts:
    8
    Hi! I'm messing around with the new(ish) Input System in Visual Scripting (unity version 2021.3.0f1), but not quite sure how the "On Input System Event" nodes work or how to use them to properly move an object around in my scene.

    I'm trying to use the On Input System Event Button node to move a cube using WASD/Arrow Keys. How do I take the outputs from On Input System Event Button and use them to control the objects movement?

    I'm incredibly new to Unity, visual scripting, and coding in general so any help is greatly appreciated!


    Using Debug, I can confirm that the script recognizes me pressing WASD keys but I don't know how to take those outputs and translate them to object movement.

    Thanks in advance!
     
  2. RimTobbins

    RimTobbins

    Joined:
    Apr 9, 2022
    Posts:
    8
    Do I still need to use a Switch similar to the visual scripting tutorial that uses the older input process prior to the Input System changes? This is what I did for the tutorial:
    upload_2022-4-14_15-3-31.png

    I was hoping the On Input System Event Button node helped streamline some of the above, but maybe I'm just not understanding the purpose of that node/the new input system as a whole.
     
  3. AwsomeExperiment103

    AwsomeExperiment103

    Joined:
    Sep 11, 2022
    Posts:
    2
    Did you ever find a solution? I am having the same problem. The input system does not seem to be working for me when I am using visual scripting. I got it to work for a second, but it stopped working soon after.
     
  4. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    are you only trying to translate an object?
    not move a player character or rigidbody?
    Capture.PNG


    Then you could even make it look super clean by nesting all of that into a subgraph.
    makes it nice and neat.
    Capture2.PNG

    inside the subgraph Capture.PNG
     
    Last edited: Oct 20, 2022