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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Fake Cursor UI with joystick input

Discussion in 'Input System' started by orphicninja, May 5, 2021.

  1. orphicninja

    orphicninja

    Joined:
    Feb 11, 2020
    Posts:
    3
    So I'm trying to make a "fake" cursor that is moved by the controller left stick axis but I can't seem to manage to move the cursor image. I have tried using the recttransform.localposition and the anchoredposition but none are working.

    Code (CSharp):
    1. Void update() {
    2.      Getcomponent<Recttransform>().localposition = new Vector3(Input.GetAxis("Horizontal")*speed),Input.GetAxis("Vertical")*speed, 0.0f);
    3. }
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,996
    Note that Update() should have uppercase U, if thats the issue?
     
  3. orphicninja

    orphicninja

    Joined:
    Feb 11, 2020
    Posts:
    3
    My bad i typed that on my phone last night but i figured out the issue, turns out just restarting unity fixed the problem. None of the input system was working
     
    mgear likes this.