Cinemachine Freelook Camera Movement with Joystick
I'm trying to make a third person RPG that's controlled with a gamepad. I am using the Cinemachine Freelook camera and Unity's Input System. So far the gamepad works just fine in making my player character move and perform actions; however, I want to control the camera's rotation with the right joystick. Only the mouse can control it's movement right now, and I don't want the mouse to control it at all. If anyone knows a script or a setting change that will get me these results, please let me know.
Answer by jhubbard0221 · Jun 06, 2020 at 03:49 PM
Figured it out, it was actually a pretty simple fix. Go to Edit > Project Settings > Input Manager and change the Type and Axis (Under Mouse X and Mouse Y) and change them to your desired inputs. You will probably also have to change the Dead setting, or else your camera will drift without you moving the joystick. I found a Dead value of 0.01 works best. If anyone has any questions about this, let me know.
hey man I am a beginner and i am trying to do the same but I don't understand your solution I changed the values for type and axis but it didn't do anything I am using the joystick pack from fenerax studios.
Answer by paulby · Oct 21, 2020 at 10:16 AM
for clarity, you need to use joystick axis 4 and 5 for right stick inputs
if you want both controller and joystick support I wouldn't change the existing Mouse X and Mouse Y.
I would put two more axes in, with the duplicate names Mouse X and Mouse Y, but with joystick 4 and 5. this way both will be used
hey man I am a beginner and i am trying to do the same but I don't understand your solution I changed the values for type and axis but it didn't do anything I am using the joystick pack from fenerax studios.
Answer by SkepticScar · Apr 26 at 04:24 PM
Hey man can you share the answer more specifically and tell me what joystick pack u are using?
Go to Edit > Project Settings > Input Manager and change the Type and Axis (Under Mouse X and Mouse Y) and set them to 4th axis and 5th axis this will override mouse with controller input. see this image https://i.imgur.com/HzAtGfs.png
sorry man I misunderstood the question here I thought this was about mobile joystick and not like the actual controller I wanted to control the free look on mobile because when i move my player movement joystick the camera also moves.
Your answer
Follow this Question
Related Questions
Gamepad recognized as joystick and doesn't work 0 Answers
Trouble with cross platform input in mobile multiplayer 1 Answer
Why my joystick axis value when i press them always 1 ( left and right ) ? 0 Answers
Joystick Orientation Wrong After Camera Rotation 1 Answer
Character Jump only works randomly and only with the "Y" Button 0 Answers