0
\$\begingroup\$

I created a 3D mobile project, so I used my own joystick script, I also tried joystick from asset store. The problem is that the stick image of joystick doesn't move at all, in this case it's impossible to get input. It doesn't react on input. I searched for the problem and sollution was about raytracer on camera, I added it, still doesn't work. What is the problem? I also followed tutorials to make it step by step, so there wasn't scripts problems and it was the same...

Camera settings

Joystick asset prefab

Canvas settings

EventSystem

Active input handling set to both new and old versions

\$\endgroup\$
8
  • 1
    \$\begingroup\$ without even knowing what kind of joystick you used, we can't help you. Is it a UI Joystick (on a canvas)? Is it bound with new/ old input system? How is it set up in your scene? \$\endgroup\$
    – Zibelas
    May 15, 2022 at 12:45
  • 1
    \$\begingroup\$ "I followed tutorials" does not narrow down which of the millions of tutorials you followed. Please edit your question to include a Minimal Complete Verifiable Example of the problem: every line of code and scene or project setup step that a reader would need to follow in order to reproduce the problem you're seeing, starting from a new, empty project. \$\endgroup\$
    – DMGregory
    May 15, 2022 at 12:50
  • \$\begingroup\$ @Zibelas it's unity 2021, UI joystick. I tried to use image/pan to make a stick, I didn't do any settings for canvas except scalability with screen size. \$\endgroup\$
    – Silz
    May 15, 2022 at 12:51
  • \$\begingroup\$ Can you show us your EventSystem object? It would also help to link to where you got this "Fixed Joystick" script from. \$\endgroup\$
    – DMGregory
    May 15, 2022 at 13:02
  • \$\begingroup\$ Usually the EventSystem gets created automatically when adding a Canvas the first time to the scene. It is needed to process the input from your UI elements and from your screenshots (without seeing the scene hierachy) it is missing and sounds like it fits your problem \$\endgroup\$
    – Zibelas
    May 15, 2022 at 13:05

1 Answer 1

0
\$\begingroup\$

You have no input modules attached to your Event System. That means you have the central router for directing events to game objects, but you're missing the parts that actually receive input events from the screen/mouse/etc. and pass them into that pipeline.

Add an "Input System UI Input Module" component to your Event System object. In its default configuration, it should already be set up to respond to both mouse and touchscreen interactions.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks. Now it works. \$\endgroup\$
    – Silz
    May 15, 2022 at 14:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .