GODOT 4 ROOT MOTION MOVEMENT TUTORIAL

Поделиться
HTML-код
  • Опубликовано: 22 апр 2024
  • Unfortunately i cannot cover the whole tutorial in this video. I'll add third person camera and player rotation in the next video.
    Part 02 : • Godot 4 Third Person C...
    You can test the compile project at www.mediafire.com/file/99bl84...
    As for source code, you can get it at my patreon page:
    / brok3ncircuitproject
    Full project also include turn 180 movement.

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

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

    Just discovered your channel, I love your content!

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

    Great tutorials! Thanks. I'm already using it in my game project, even understanding the tutorial I bought at Patreon to help. Continue, please. 🥰

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

      Thanks for your support and good luck with your project 🤩

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

    great tutorial thank you so much

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

    omg thank you animation state machines were so confusing to me!

  • @faiz-ibn-javed
    @faiz-ibn-javed 2 месяца назад +1

    First...❤ From India
    Divice Android

  • @UnityScrapesfordimes
    @UnityScrapesfordimes 2 месяца назад +1

    W mans thanks bro

  • @plothasholes4462
    @plothasholes4462 2 месяца назад +1

    Next episode when
    This is amazing tutorial

  • @UnityScrapesfordimes
    @UnityScrapesfordimes 2 месяца назад +1

    Can you add to this a turn system similar to red dead two, it’s when you lightly tap the joystick or wasd and it rotates the way the wasd or joystick is facing, it’s also in gta 5. Btw what animations did you use, can you link them when I tried this in until it kept moving me to the side.

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

    Great tutorial. could you show the whole script through out the video?

  • @christopherfrancisco8966
    @christopherfrancisco8966 24 дня назад

    Love your tutorials. Will any 3d model work? (i.e: one downloaded from Mixamo), or is there a requirement the 3d model must meet in order for root movement to work? (I know you said about to "root" bone, but is that a convention of some sort? My model has a single bone as the parent but it isn't called "root"

    • @Brokencircuitboard
      @Brokencircuitboard  24 дня назад

      Yes. Your character model must have root bone to work with this script. Mixamo animation don't have root bone by default, but there are blender plugins to add it or you can do it manually. U can also use hip bone as replacement to root motion, but it will not look right.

  • @nocco0759
    @nocco0759 2 месяца назад +1

    Great Tutorial, thanks for sharing this man, also i have a question if you don't mind, when you import a character from mixamo with animation to godot, then you let's say you want to add new animation to the character from blender, how can you add new animation to the character using AnimationPlayer ?, i tried to add new animation but i couldn't find where to link it to the character model. Thanks in advance

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

      First, retarget the animation bone to match godot humanoid skeleton. Then, inherit that animation scene. Open the animationplayer that came with the animation. At animation track, open 'Manage Animations', 'Make Unique' then save the animation. You can upload the save animation for other character later.

  • @shad0wborn602
    @shad0wborn602 2 месяца назад +1

    where can I get a model of this character?

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

    where did you get that model i really want to know

  • @Slava-Ukraini
    @Slava-Ukraini 2 месяца назад +2

    +1 sub

  • @jujume1327
    @jujume1327 День назад

    My player doesn't move :( I have a rootbone for my skeleton but I guess it is incompatible somehow? I'm using a .vrm that I rigged in Blender and added retargeted mixamo animations to. Do you think I should look for a different method rather than root motion?
    Regardless, thanks for the video it was still very informative!

    • @jujume1327
      @jujume1327 День назад

      thought I would note the model is a .glb, it was originally a .vrm when I imported it into blender

    • @jujume1327
      @jujume1327 День назад

      update: figured it out! I needed to add a root bone to the mixamo armature before retargeting the animation to my model in blender!

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

    Amazing, I've a question, can we blend the walk animation with the player's speed?

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

      Yes we can. We can add RUN cycle when pressing sprint or use blendspace.

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

      ​@@BrokencircuitboardOoo okay thanks

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

    excellent tutorial!
    how did you set your "root" bone?
    I was trying to use the mixamo "Hips" bone as the root, but it turns animations extremely janky
    I mean, I belive you attached a new bone "root" in blender, but how do you pair it with the move animations?

    • @Brokencircuitboard
      @Brokencircuitboard  2 месяца назад +1

      I did it manually with blender. The new root bone bone must be the parent of all the bone in the hierarchy. There are plugins out there you can try.

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

      I found a mixamo add on in blender, some people have tutorials up for adding the root, there is a specific one for godot

  • @zaccmain3121
    @zaccmain3121 26 дней назад

    why I'm getting this type of error?
    root_velocity = current_rotation * root_pos / delta
    Unexpected "Identifier" in class body.

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

    Sir, may I repost your tutorial on a Chinese platform? RUclips is not available in China.

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

    Pls a car tutorial pls

  • @TheSkatingAces
    @TheSkatingAces 25 дней назад

    Hey! my character can move around but the animations do not play, the character just stays static. The rootbone is selected in the animationtree but it does not work?

    • @Brokencircuitboard
      @Brokencircuitboard  25 дней назад

      It seem you are moving your character through code. If you follow my script, your character should not moving if the animation not playing since it done entirely by root bone. Either the code is missing something or your character's root bone is not actually root bone. Do you perhaps use mixamo animation?

    • @TheSkatingAces
      @TheSkatingAces 25 дней назад

      @@Brokencircuitboard Hey, thanks for the reply. Yeah i use mixamo animation, but i have used a mixamo rootbone plugin in blender to give it one. I have now managed to get the animations to play, but all the key inputs move the character forward, even though i have assigned them in the input map.

    • @TheSkatingAces
      @TheSkatingAces 25 дней назад

      Here's my script. I think i did it as you did in the video? Maybe i missed something.
      extends CharacterBody3D
      #Animation Parameter
      @export var animation_tree : AnimationTree
      @export var animation_player : AnimationPlayer
      @onready var animation_state = animation_tree.get("parameters/playback")
      # player parameter
      var inputdir = Vector3()
      # animation Condition States
      var anim_canmove = bool()
      # Physics values
      var direction = Vector3()
      var vertical_velocity = Vector3()
      var turn_speed = 10
      var root_velocity = Vector3()
      #input
      var horizontal = float()
      var vertical = float()
      func _process(delta):
      horizontal = Input.get_axis("right", "left")
      vertical = Input.get_axis("backward", "forward")

      var root_pos = animation_tree.get_root_motion_position()
      var current_rotation = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion())
      root_velocity = current_rotation * root_pos / delta
      var root_rotation = animation_tree.get_root_motion_rotation()
      set_quaternion(get_quaternion() * root_rotation)


      func _physics_process(delta):
      animation_tree.set("parameters/conditions/startmove", anim_canmove)
      animation_tree.set("parameters/conditions/idle", !anim_canmove)

      #Movement input
      inputdir = Vector3(horizontal,0, vertical).normalized()

      if (inputdir != Vector3.ZERO):
      anim_canmove = true
      else:
      anim_canmove = false


      velocity = root_velocity
      move_and_slide()

    • @Brokencircuitboard
      @Brokencircuitboard  25 дней назад

      @@TheSkatingAces Yup. that's about right. Now check out part 2 of this tutorial to fixed those input move.

    • @TheSkatingAces
      @TheSkatingAces 25 дней назад

      @@Brokencircuitboard still not working. would be easier if i could show screenshots:/ discord?

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

    My charactor doesn't move. What can i do?

  • @apricoskaart9147
    @apricoskaart9147 2 месяца назад +1

    what is that model you used here?

  • @JStace
    @JStace Месяц назад +3

    my guy doesn't move.

  • @Sashye111
    @Sashye111 2 месяца назад +3

    Cool, can u add Rotation Motion 😮

    • @Brokencircuitboard
      @Brokencircuitboard  2 месяца назад +6

      Working on it. Expect it to be available in a few days.

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

      @@Brokencircuitboard Sorry I'm confused, I thought this was root motion?

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

      @@phoenixastra4429 It is. I just not making player turn in this tutorial. Your project files should contain all completed project.

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

      @@Brokencircuitboard Ohh okay! Sorry the other guys comment confused me I wanted to make sure I understood xD tysm!

  • @UnityScrapesfordimes
    @UnityScrapesfordimes 2 месяца назад +1

    Would this work on unity?

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

      Yes it will. In fact, it will be even simpler since unity come with build in root motion and unity animator IMHO is way better than godot.

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

      @@Brokencircuitboard alr thanks man

  • @StartGameDev
    @StartGameDev 2 месяца назад +1

    Hi, I am a Silver subscriber on your patrion, I would like to ask you to make videos showing how to do the Silver systems, and make them available only to those who are Silver, as I have difficulty learning by looking

  • @bnkm07
    @bnkm07 2 месяца назад +1

    is there anyway to get the source code for free cause im broke af

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

      Don't worry, more tutorial are coming. I'll share the code on my tutorial.

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

      @@Brokencircuitboard allright thank youu

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

    Just a little question but will you do tutorials on animation? I'm not a good animator and I'm terrible at 3d stuff

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

      Same. i use pre make animation instead of animate it myself. Mixamo is your friend.