❔ Help w making movement with joystick

Hello, i need help to make movement with joystick, i have some codes but they dont work, been trying whole day, if somebody is free and can help me i would be grateful
4 Replies
boiled goose
boiled goose2y ago
what are you using to read joystick data
Sensei Kendi
Sensei Kendi2y ago
using System.Collections; using System.Collections.Generic; using UnityEngine; public class JoystickMovement : MonoBehaviour { public Joystick joystick; public CharacterController controller; public float speed 12f; void Update() { float x = Input.GetAxis(joystick.Horizontal); float z = Input.GetAxis(joystick.Vertical); Vector3 move = transform.right * x + transform.forward * z; controller.Move(move * speed * Time.deltaTime); // joystick wont give a value until its dragged far enough away joystick.DeadZone = 0.2f; } } @dont this ig it gets axis from joystick but i think i did it wrong
Buddy
Buddy2y ago
Use new input system Old unity input is dogshit
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.