- Home /
Unable to insert joystick in 3d game kit lite
Hello,
I downloaded your 3D Game Kit Lite Package and I am having some difficulty modifing the input system in that. I want to introduce 1 joystick to replace keyboard input control with the joystick control of Ellen and have tried a couple of packages but every package is having some issue in mobile, whereas in unity editor on PC they are working as they should be. The following packages I have used.
1. CN Controls (Joystick, Touchpad, Button and D-Pad) -
https://assetstore.unity.com/packages/tools/input-management/cn-controls-joystick-touchpad-button-and-d-pad-15233
With this package, in "PlayerInput.cs" you just have to replace :-
m_Movement.Set(Input.GetAxis("Horizontal"),Input.GetAxis("Vertical"));
with
m_Movement.Set(CnInputManager.GetAxis("Horizontal"), CnInputManager.GetAxis("Vertical"));
Note: In this package, the joystick, if moved in one direction then you cant move it to another direction without lifting your finger and redirecting it (on the mobile). In unity editor, it works great.
Simple Input System - https://assetstore.unity.com/packages/tools/input-management/simple-input-system-113033
With this package, in "PlayerInput.cs" you just have to replace :-
m_Movement.Set(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
with
m_Movement.Set(SimpleInput.GetAxis("Horizontal"), SimpleInput.GetAxis("Vertical"));
Note: In this package, the joystick doesn't work on the mobile. In unity editor, it works great.
I used the crossplatform input from the package and imported the "CrossPlatformInput" folder and "CrossPlatformInputInitialize.cs" script.
I imported the "MobileSingleStickControl" prefab on the the scene but could not get it to work even on the editor.
Your answer
Follow this Question
Related Questions
A plugin crash on existing project, but works well on new project 0 Answers
Is there any other way to call into Unity from Objective-C other than UnitySendMessage? 2 Answers
Making a plugin from an open source music language 0 Answers
Exporting Unity3D game with managed plugins to Nintendo Switch 0 Answers