Mobile Joystick In Godot (Top-Down RPG Tutorial)

Поделиться
HTML-код
  • Опубликовано: 6 фев 2025
  • In this video, I will walk you through the step-by-step process of adding a virtual joystick to your mobile game using the Godot Engine.
    If you're interested in adding touch buttons to your mobile game, check out the video here.
    • How To Add Mobile Cont...
    Assets
    RPG pack - yurisantosart....
    Character pack - merchant-shade...
    Godot Version - 4.2.1

Комментарии • 30

  • @Normax_X
    @Normax_X 14 дней назад

    peak tutorial worked first try

  • @noejunior299
    @noejunior299 7 месяцев назад +1

    I really liked your video, it helps a lot, it was worth my subscription, I wish it had godot multiplayer too

  • @ClarkSilent
    @ClarkSilent 3 месяца назад +1

    really helpful!

  • @scottisitt
    @scottisitt Месяц назад

    That was awesome! Thank you so much!

    • @WisconsiKnight
      @WisconsiKnight  Месяц назад +1

      Glad you liked it! Thanks for watching.

  • @Crusader_01
    @Crusader_01 7 месяцев назад

    You're a lifesaver dude😭🙏 please make more on mobile controls❤

  • @Qux1s
    @Qux1s 14 дней назад +1

    and on this gamepad it works that if you just slightly tilt it, the character will move slowly, and the animation will also slow down? Is it possible to transfer such a function to the keyboard?

  • @GabrieCruz-l4z
    @GabrieCruz-l4z 4 месяца назад

    Recommended 🎉

  • @Prefacedowl
    @Prefacedowl Месяц назад

    i tried this; the side movement is working but the up and down movement is not working Please help me

    • @WisconsiKnight
      @WisconsiKnight  Месяц назад

      In your Player script, are you defining what happens when Input up and Input down are triggered?

    • @N.asper02
      @N.asper02 10 дней назад

      Bro make action keys and assign it to the joystick and your code, it will work

  • @NielsNL1
    @NielsNL1 Месяц назад

    how do you have it at bottom left, mine goes to like middle left

    • @NielsNL1
      @NielsNL1 Месяц назад

      nvm i figured it out

  • @mariomanchevsky
    @mariomanchevsky 6 месяцев назад +1

    After downloading the same joystick, the VirtualJoystick inspector tab isn't showing up for me. So I don't have any of the properties available that you're having from 02:10 onward. This is a blank, brand new project, on 4.2.2 stable. What am I doing wrong?

    • @WisconsiKnight
      @WisconsiKnight  6 месяцев назад +1

      Without seeing your project, it's hard to say for sure. I have two suggestions:
      1. Make sure you are dragging the correct file onto your scene: `virtual_joystick_scene.tscn`.
      2. Try adding it a different way. Go to `Project > Project Settings > Plugins` and ensure the virtual joystick plugin is enabled. Then, go back and try to add the joystick using the plus button in a scene, just like you would normally add a new node. It is called `Virtualjoystick` (`virtual_joystick.gd`).

    • @mariomanchevsky
      @mariomanchevsky 5 месяцев назад

      @@WisconsiKnight Thanks for the swift reply, and apologies for not replying sooner. After a couple of days, I got the properties to appear on my Inspector tab. They initially don't appear, but if you change any of their properties inside the actual script itself, the changed property will appear inside the Inspector as well. For example, if you change "@export var action_left := "ui_left" " to "@export var action_left := "left" " inside the Joystick's script, the "Action Left" property will appear inside the Inspector tab. It's the same train of thought for any other properties shown on the footage as well (for any other Godot newbies like me out there). 👍

  • @grimm7z7
    @grimm7z7 Месяц назад

    Is it possible to use a vector2 for the output of the joystick instead of input maps?
    because i already have a lot of player code that relies on a vector2

    • @WisconsiKnight
      @WisconsiKnight  Месяц назад

      You can catch the input vector in your script whether the input is being given through the joystick, keyboard, or game controller.
      Without seeing and understanding your codebase, it's hard to give specific guidance. I hope this helps. Godot docs on movement overview: docs.godotengine.org/en/stable/tutorials/2d/2d_movement.html

  • @Trendsthismonth
    @Trendsthismonth 5 месяцев назад

    How is your player moving in all directions fine with the same joystick but on mine when i go up pr down the character is walking in zig zag pattern?

  • @Probablynotme13
    @Probablynotme13 3 месяца назад

    Im on android how to set it to work for mobile?

    • @Cristiwhat
      @Cristiwhat 3 месяца назад

      Do what he did in video

    • @N.asper02
      @N.asper02 10 дней назад

      Same I worked it out on my tab

  • @Trendsthismonth
    @Trendsthismonth 5 месяцев назад

    My joystick is only moving the player left and right. How do I make it go all directions?

    • @WisconsiKnight
      @WisconsiKnight  5 месяцев назад +1

      In your player script, you should capture and define user inputs for all desired directions to control character movement. Next, assign the same input maps defined in your settings to your joystick.
      As far as animations of the character go., I'm using an AnimationPlayer to define animations for all 8 directions-though it's not necessary, as you could use just 4 directions. I'm using a BlendSpace2D in the AnimationTree to switch between animations based on character movement.

    • @Trendsthismonth
      @Trendsthismonth 5 месяцев назад

      I think this Marco joystick is outdated? I couldn't find it in th latest version of Godot 4 and I installed the one in Godot 3.5. The picture of it is now a red paper that looks torn.
      I was able to move up and down but it is very difficult to make it happen...I have to let the joystick go back to the center and after trying 20-30 times it finally goes up and down. I made sure my script is using ui_left etc. The player can go left or right very easily. The player can go up and down very easily IF I turn the left and right options off.

    • @N.asper02
      @N.asper02 10 дней назад

      I'm having the same issue dude please guide me, I'm not in a condition to make my own💀​@@Trendsthismonth

    • @N.asper02
      @N.asper02 10 дней назад

      Bro make action keys and assign it to the joystick and your code, it will work ​@@Trendsthismonth

  • @marcelodavila8569
    @marcelodavila8569 6 месяцев назад

    How do I call it in my player? it does not recognize it

    • @WisconsiKnight
      @WisconsiKnight  6 месяцев назад

      You don’t reference the joystick in your player. Both your player and the joystick reference the Input Map in your settings. Check out 2:15

    • @javideas
      @javideas 2 месяца назад

      if you are using a CharacterBody2D as a base scene (class), then you have to rename the inputs that are inside the func _physics_process, by default they are like "ui_left" but it should be now, following this tutorial, just "left"