Car only turns left

I thought I would be able to solve this, but it has gotten late and I have a theory this has to do with the new input system which I am unfamiliar with.

This question is regarding the mobile app development course, currently in the simple driving course. I am running Unity 2023.1.12f1 and this is the issue:

When I click on the left side, it recognizes that and starts turning left, but when I let go, it continues turning left. I have pointer enter event with a value of 1 and a pointer exit event with a value of 0 so in theory it should work, but using some debug logs, I found that when I let go of my click, it runs the command twice and the second time it runs, it reads out -1 for turning left again. A second later, without any input, it runs the code again giving a value of 0.

More of a puzzle is how when I click on the right side, even though the value is set to 1, it still reads out -1 as the value for rotating my car.

I double checked that the two images allocated for each side are not overlapping in play mode or in the simulator. When I switch to play mode, it works perfectly fine.

So is the issue with the device simulator - if so, what can I do to fix this? Or is the issue with the input system?

Thanks for any help! If you need more clarification or anything else from me, let me know!

This is a known bug in the Device Simulator, that we haven’t found a workaround for.

The good news is that this is not an issue within a built player.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms