Search Unity

reading joystick value

Discussion in 'Scripting' started by fab001, Sep 25, 2020.

  1. fab001

    fab001

    Joined:
    Jun 19, 2017
    Posts:
    1
    Hi guys, I am preety green on unity and programming. I have written a script to handle joystick input velocity in a 2d project to move an object (just vertica). Now I need to read and display the actual joystick value from 0 to 100 as I move the stick. Any help?
    .
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    You can always display values with Debug.Log() if it's just for you in development.

    If you want to show the value to the user, then make a UI using the Canvas and UnityEngine.UI system. There are tens of thousands of tutorials on setting up a UI in Unity, both on Unity's site and all over Youtube.