Creating a 3D Character Controller With Animations with Godot 4!

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.ค. 2024
  • Subscribe and learn more from me about Game Development and Programming!
    In this video, we talk about how to make a 3d character controller in Godot 4! We talk about how to do animations and how to handle collisions with the camera!
    RESOURCES
    Source Beginning: github.com/finepointcgi/3D-Mo...
    Source End: github.com/finepointcgi/3D-Mo...
    BE MY FRIEND:
    🐦Add me on Twitter: / finepointcgi
    Check out my Website: finepointcgi.io/
    Trello of Upcoming Tutorials: trello.com/b/cJWPaVyV/godot-t...
    You can support me on Patreon: / finepointcgi
    Hang Out with the Guys on Discord: / discord
    TIMESTAMPS
    00:00 - Start
    00:31 - Discussing the Prereqs to the Tutorial
    01:50 - Getting Started
    05:29 - Setting Up Our Camera Controller
    06:52 - How To Rotate the Camera With Your Mouse
    10:45 - Talking About Clamping Rotation
    11:51 - How To Handle Your Camera Zooming In on Collision
    14:24 - Looking at Our Characters Head
    16:29 - How To Rotate the Player to Where the Camera Is Looking
    18:30 - How To Capture Our Mouse
    19:35 - Fix Our Character Rotating Up and Down
    21:41 - Creating a Lazy Rotation
    25:54 - Oh Boy Animations
    27:04 - Discussing Our State Machine
    45:12 - Outro
    MUSIC
    Music provided by TheRelaxedMovement.
    Check it out here: / therelaxedm...​
    HASHTAGS:
    #Godot4 #character #gamedev
    ABOUT MY CHANNEL:
    I've been a software developer for over 7 years. I've worked in the game industry for 3 of those years. This channel is used for news on the gaming\programming industry and for tutorials for game\programming development.
    Creating a 3D Character Controller With Animations with Godot 4!

ความคิดเห็น • 129

  • @The_Soup_Master
    @The_Soup_Master ปีที่แล้ว +14

    Nomination for best upcoming Godot TH-camr.

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +1

      Nah heartbeast is way better!

    • @thomasparker7305
      @thomasparker7305 ปีที่แล้ว

      @@FinePointCGI I don't know I have watched him also and yes he is good but I think you have them all beat.

  • @remigodin9103
    @remigodin9103 ปีที่แล้ว +10

    Right on time! Started playing around with animations yesterday and this video really helps! I appreciate your hard work!

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +2

      Hey thanks I hope it out was useful!

  • @dabajabaza111
    @dabajabaza111 ปีที่แล้ว +1

    This is just what I wanted. I can't wait to watch this later!

  • @tamzid5811
    @tamzid5811 ปีที่แล้ว +4

    Just found this channel, and this is amazing timing as I am new to Godot and with the new version out there this is very convenient. Keep it up!

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +1

      Hey Welcome! I hope I can help you out! Let me know if there's any topics you think would be good to be covered and ill be more then happy to look into it.

  • @mrkaratedo
    @mrkaratedo ปีที่แล้ว +5

    Excellent tutorial in third person, very good!. I hope you continue another one: where the character executes actions by touching objects, for example, climbing on a box

  • @kabaoum1519
    @kabaoum1519 ปีที่แล้ว +20

    This tutorial was exactly what I needed to understand how the animation tree conditions worked! It just wasn't clear to me that adding a condition to a transition resulted in a new property on the animation tree node. I really appreciated the starter project so I could get right to the details of the tutorial.
    Some critiques on the video
    1) You could remove the manual "lookAt" code that makes the camera point at the head of the character if you set the controller (and by extension the spring arm's origin) to the same global position as the "lookAt" node in the controller's code - then the camera will naturally point at the place that you want without making manual adjustments to the camera's rotation
    2) the state machine could be drastically simplified if you inserted a 2d blendspace for the walk/strafe animations instead of inserting all of the animations directly, then the walking logic can be handled by a single set of transitions and the animations will blend seamlessly between walk and strafe

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +1

      Hey thanks for watching also, thank you for the critiques! I actually do number 2 in my root motion tutorial I didnt think about using it until my c# version of this tutorial! As for 1 ill have to look at it.. I think I do something similar to this on my root motion tutorial as well but I don't remember..

  • @michaelbrannaka4046
    @michaelbrannaka4046 ปีที่แล้ว

    Thank you for sharing your Godot 4 game engine online tutorial it has been a big help for me to get started on my indie Game development journey with Godot 4. Please keep up the good work doing the online tutorial.

  • @charsarsis
    @charsarsis 4 วันที่ผ่านมา

    This was brilliant, thank you!. I finally understand how to use and setup my own state machine controllers!

  • @sigitsatriap6505
    @sigitsatriap6505 10 หลายเดือนก่อน

    best explanation for State Machine and Animation Tree so far that i found !

  • @indieology7336
    @indieology7336 ปีที่แล้ว

    Awesome tutorial!

  • @Switch620
    @Switch620 ปีที่แล้ว +1

    lol perfect timing!! literally searched for this a half hour after it came out.

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว

      I hope you find it useful!

  • @robotmr
    @robotmr 3 หลายเดือนก่อน

    Very good Tutorial. Thank You!

  • @Svensky
    @Svensky ปีที่แล้ว

    This is amazing tutorial thank you.

  • @Stanlix01
    @Stanlix01 ปีที่แล้ว

    This is good stuff. Thanks

  • @Turgoleh
    @Turgoleh ปีที่แล้ว +6

    About the rotations, in code they're expressed in radians. So @11:44, -1 actually means 60° (PI/3) and is above the character, while 0.25 corresponds to 14° close to the ground.

  • @Lord0gamer
    @Lord0gamer 5 หลายเดือนก่อน

    رحم الله والديك حبي والله لو ما انتة چان هسة شامر هالسالفة التعبتني وراية....thanks alot❤️

  • @sega5785
    @sega5785 ปีที่แล้ว +33

    You should include delta time in lerp statement. If framerate changes the bahavior of rotation will be unexpected.

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +13

      This makes sense! I have noticed some odditys here and there so that's probably why!

    • @wungielpolacz9232
      @wungielpolacz9232 11 หลายเดือนก่อน +1

      How can I do that?

  • @phoenixastra4429
    @phoenixastra4429 2 หลายเดือนก่อน

    I'm an absolute beginner so I really appreciate this! I was trying to learn another character controller one and then add my own stuff to it (bc I want to try to do stuff on my own at least for practice in between tutorials? So I'm not just doing tutorials I guess to begin xD but someone was coding the movement manually instead of using state machines and state machines is SO much easier holy heck. The jump and fall was driving me crazy because of an locked/unlocked animation situation. So greatful for this

  • @KevinNijmeijer
    @KevinNijmeijer ปีที่แล้ว +1

    Nice video! I personally prefer putting the camera under the player scene using a pivot + spring arm (as you did) and putting the mesh / collisionshape under a node within the player tree so turning the character(mesh/shape) doesn't rotate te camera.
    I would love to see you do a tutorial on your view on using concurrent state machines for things like attacking while jumping, running etc!
    Oh and a fun thing that instantly adds a little more immersion is to put the LookAt (or the pivot point of the spring arm) a little in front of the character's face! It will give you more feedback when turning your character (A little trick from deconstructing Kingdom Hearts' character controller)

  • @4mb127
    @4mb127 ปีที่แล้ว

    Thanks for doing what you do. I really enjoy your videos even though I don't always have time to watch all of them.

  • @drac8854
    @drac8854 ปีที่แล้ว +1

    Hi
    Thanks for the video
    I know this is very basics
    I didn't know how to do this 😅

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว

      Hey I'm glad it's helping you out!

  • @user-rx3xl7zn1u
    @user-rx3xl7zn1u ปีที่แล้ว +4

    Thank you for this. I painstakingly went through the animations to fix the weird fall landing issue.

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว

      Yeah it's a bad animation on my part to use but mixamo animations can be funky

    • @user-rx3xl7zn1u
      @user-rx3xl7zn1u ปีที่แล้ว +1

      @@FinePointCGI I've only just begun learning Godot and figured it was a chance to learn Godot a bit more.

  • @owenlloyd2528
    @owenlloyd2528 10 หลายเดือนก่อน

    Thank you

  • @GPXIII
    @GPXIII 2 หลายเดือนก่อน

    For all newcomers like me:
    40:30 I think a clean solution is a blendspace 2d node for all walking, strafing and idle animations. I use blendspace 1d for my character because I don't need strafing and it works very well. And maybe we can put the jumping/falling stuff in a seperate state machine node, but I didn't try it myself.
    Thanks for this tutorial, it helped me a lot!

  • @Nosferatuhound
    @Nosferatuhound ปีที่แล้ว +3

    I would love if you could do a video of how to set it up the character in blender and if you could add in a way to go from first person to third person view.
    really great video though i am learning a lot from your channel so thank you so much.

  • @mrkaratedo
    @mrkaratedo ปีที่แล้ว

    It would also be good if you make him move crouched. Thanks and great job!

  • @saitmarasloglu9403
    @saitmarasloglu9403 ปีที่แล้ว +1

    Thanks for great video.
    I tried to add an attack animation, just saw that attack animation always runs , how can I set attack condition to false after attack finished?
    I tried animationtree, animation_finished signal, for some reason , animation still fires twice.

  • @GeneralChrisGaming
    @GeneralChrisGaming 2 หลายเดือนก่อน

    Hey i love the fact that this actually manages to work as all other one failed to work on mobile, however i noticed that when i jump my character will do this rocking motion. I looked through the code to see if maybe i mess up somewhere but it seems to be right. a small adjustment i made was to move the LookAt node very far but this can make thing harder for levels i fear later down the line as the character still tilts itself in the air. do you know how i can completely lock the axis of the player to prevent this using your camera set up/script?

  • @meursw8868
    @meursw8868 ปีที่แล้ว +2

    if you are having problems with the lerp section, what i did is I changed .05 to 4.2 * delta and also I put the position of the LookAt node in camera controller to -400. I dont know if this is good practice or a good solution but it works much better than before. I also have the y position of the LookAt node in camera controller to 2(around the same height as my characters head)

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +1

      That does seem like a good solution when i did that i ran into issues with jumping and my character would learp slow although you should multiply by delta which is something i missed

  • @BreakNeckJim
    @BreakNeckJim 11 หลายเดือนก่อน +1

    Has anybody else noticed that when the character strafes he moves forward slightly?
    How do I make this work so that my character will strafe perfectly left and right?
    Is it a problem with radians vs. degrees?

  • @lukabrasi001
    @lukabrasi001 ปีที่แล้ว +1

    how would you do a blendtree of this? i have a first person character controller with some animations mapped to the left and right, as well as forward buttons for view sway and i wanna blend between them as i'm strafing

  • @gustavomgg
    @gustavomgg ปีที่แล้ว

    niceeee

  • @Easelm
    @Easelm หลายเดือนก่อน

    Wow. That animation tree is a spider-web.

    • @FinePointCGI
      @FinePointCGI  หลายเดือนก่อน

      In the c# version I do it quite a bit better using blendtrees but yes in this one it's a web..

  • @Psycho_Typist
    @Psycho_Typist 19 วันที่ผ่านมา

    :33:53: I only added walking and idle animations, but when I tried scripting, the code didn't work. Do you have a solution, or is there a way to add animations directly from the player, similar to 2D? I'm new to 3D and finding it challenging.

  • @madlink3495
    @madlink3495 6 หลายเดือนก่อน

    Hi, thank you for the tutorial.
    I'm trying to make your tutorial work in my sample project, and I'm struggling with the rotation feature:
    model.rotation.y = lerp_angle(model.rotation.y, look_direction.angle(), delta * 12)
    When I add this specific line of code in it, it only works at first when I use the directional keys to move, but as soon as I let go the model snaps back to the default angle. Not only that, but it doesn't update to the angle it was facing before I let go, so it still feels like it only looks like it's rotating, but doesn't actually stay rotated.
    can you help me? I know I'm missing something, but I can't tell if it is just the code, the 3d nodes, or a combination of the two.
    (If it helps this be less confusing, I'm trying to break down the features and isolate just rotating my character as I move it, not rotating the camera with my mouse.)

  • @WimmyWamWamWozl
    @WimmyWamWamWozl ปีที่แล้ว +1

    Everything in the tutorial seemed to work great. Up until the lerp section. Not sure if I did something wrong. But now the player only wants to look at center of map. Before adding the lerp code the player followed the camera properly.

  • @maniksharma9736
    @maniksharma9736 ปีที่แล้ว +2

    Use animation tree blender space!!

  • @eman4806
    @eman4806 8 หลายเดือนก่อน

    when I do line 21 and 22 for the camera controller they both get errors saying unexpected identifier In class body I don't know if its the tempRot or something

  • @gomibak514
    @gomibak514 ปีที่แล้ว

    im having some issues with the camera. it seems to start spinning very quickly when i try to move the camera like 180 degrees in game.

  • @mrkaratedo
    @mrkaratedo ปีที่แล้ว

    In GDScript could you explain how to get on a cube or a table by pressing a button?

  • @tharik_fad
    @tharik_fad ปีที่แล้ว

    If I want to make the player look at only when I press aim button. and when I don't press the aim button I want the player to rotate toward where ever the player is pressing the keys.. what should I do?

  • @rsk-smiles
    @rsk-smiles 7 หลายเดือนก่อน

    @FinePointCGI To avoid the animation spaghetti I added separate straifright and lefts to the idle …. I don’t think the tree stops you from having an animation state more than once, so idle can go to its own set of strain right left falling etc… kind of a mirror of the walk and it’s straif left right and falling. Am I being clear?
    great video btw… I am new to Godot and finding your videos have helped me a lot.

  • @ObrunoDF
    @ObrunoDF 4 หลายเดือนก่อน

    My man, the camera is always centered in the character. I'd like to put him little to the left, like Gow or RE4. How cai I do this with your code?

  • @jasonwilliams8730
    @jasonwilliams8730 7 หลายเดือนก่อน

    What a great tutorial thank you! Do we get an "anystate" ability? What if I want to play a death animation from any state but don't want to hook all the connect nodes?

    • @wasteurtime5677
      @wasteurtime5677 7 หลายเดือนก่อน

      the root statemachine could have a death state.

  • @canhedotricks6078
    @canhedotricks6078 ปีที่แล้ว

    Hey I followed this tutorial and everything worked, but when I test it out, my player model mesh rotates while jumping. Sometimes it will even swing around and clip into the floor. I don't want this, how do I fix it?

  • @Tarnest
    @Tarnest ปีที่แล้ว +5

    Are you able to describe your learning process, basically how you learned how to make things in Godot? I’m trying to figure out how I should approach things since of course this stuff is very difficult.
    My idea as of right now is to continue following tutorials until I have some understanding of what tools I have to use and try to create little mini games with them. I’m not sure how effective this method is, and it’s certainly hard to keep myself motivated with the frustration of not knowing anything.
    Either way, I’m curious as to your approach and I would like to see if I could apply your methods to my own.

    • @TheRealFame
      @TheRealFame 6 หลายเดือนก่อน

      Tell me when he replies 😅😅

    • @FinePointCGI
      @FinePointCGI  6 หลายเดือนก่อน +2

      My approach is to just keep trying new things. What really helped was breaking down my problems into smaller sections and then researching those small sections.
      Coding things in a very reusable way is something that comes with time so you're going to have hundreds of projects that are not well put together.
      Most of my projects today are still not well put together lol

  • @KyleRassweiler
    @KyleRassweiler ปีที่แล้ว

    You can also use an @export var character : CharacterBody3d in the camera script then just select your character

  • @RedDread_
    @RedDread_ ปีที่แล้ว +1

    Not sure if you're aware but you can use blend space 2D to make your state machine much much less messy

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +1

      I do this in my root motion tutorial it's definitely something I learned after the fact!

  • @kingdarkmaster9893
    @kingdarkmaster9893 หลายเดือนก่อน

    thx for the tutorial but i have a small issue when ever i jump and walk just as i hit the ground i start walking with landing animation until the landing animation is completed and it goes back to normal ,pls help

    • @kingdarkmaster9893
      @kingdarkmaster9893 หลายเดือนก่อน

      this is the code
      extends CharacterBody3D
      var sen = 0.5
      var current_speed = 9
      const walk_speed =6
      const JUMP_VELOCITY = 6
      const running_speed = 10
      @onready var pivot = $cam_origin
      var is_running : bool = false
      var is_attacking : bool = false
      # Get the gravity from the project settings to be synced with RigidBody nodes.
      var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
      func _ready():
      Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
      func _input(event):
      if event is InputEventMouseMotion:
      rotate_y(deg_to_rad(-event.relative.x * sen))
      pivot.rotate_x(deg_to_rad(-event.relative.y * sen))
      pivot.rotation.x = clamp(pivot.rotation.x, deg_to_rad(-90), deg_to_rad(45))
      if event.is_action_pressed("sprint"):
      toggle_sprint()
      if event.is_action_pressed("attack"):
      $AnimationTree.set("parameters/conditions/punch", true && is_on_floor())
      elif event.is_action_released("attack"):
      $AnimationTree.set("parameters/conditions/punch", false && is_on_floor())

      func _physics_process(delta):
      # Add the gravity.
      if not is_on_floor():
      velocity.y -= gravity * delta
      # Handle jump.

      if Input.is_action_just_pressed("jump") and is_on_floor():
      velocity.y = JUMP_VELOCITY

      # Get the input direction and handle the movement/deceleration.
      # As good practice, you should replace UI actions with custom gameplay actions.
      var input_dir = Input.get_vector("left", "right", "up", "down")
      var direction = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()

      if direction :
      velocity.x = direction.x * current_speed
      velocity.z = direction.z * current_speed
      else:
      velocity.x = move_toward(velocity.x, 0, current_speed)
      velocity.z = move_toward(velocity.z, 0, current_speed)

      # Update animation states
      $AnimationTree.set("parameters/conditions/idle", input_dir == Vector2.ZERO && is_on_floor())
      $AnimationTree.set("parameters/conditions/fall", !is_on_floor())
      $AnimationTree.set("parameters/conditions/land", is_on_floor())
      $AnimationTree.set("parameters/conditions/walk", input_dir.y == -1 and is_on_floor() and not is_running)
      $AnimationTree.set("parameters/conditions/back", input_dir.y == 1 and is_on_floor() and not is_running)
      $AnimationTree.set("parameters/conditions/right", input_dir.x == 1 and is_on_floor() and not is_running)
      $AnimationTree.set("parameters/conditions/left", input_dir.x == -1 and is_on_floor() and not is_running)
      $AnimationTree.set("parameters/conditions/run", input_dir != Vector2.ZERO and is_on_floor() and is_running)

      move_and_slide()
      func toggle_sprint():
      is_running = not is_running
      current_speed = running_speed if is_running else walk_speed

  • @abmarych
    @abmarych ปีที่แล้ว +1

    Could you do short video how to combine different animation from mixamo into one file using blender.

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +1

      Sure! I'll make a quick one on that today or tomorrow!

  • @nilsonlagos987
    @nilsonlagos987 10 หลายเดือนก่อน

    Does godot offers the alternative to do animations without that horrible UI? I mean being able to code that instead of using the interface to connect them

  • @spartan1236
    @spartan1236 ปีที่แล้ว

    How to import GBL file?
    How did you import your character on the node?

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว

      If you export your file as a gltf file it will auto import into godot as long as you put it in the project structure

  • @ka_ekim7277
    @ka_ekim7277 8 หลายเดือนก่อน

    You mention pretty early into the video how you were able to collapse the animations into just one in blender - do you have more material explaining that a bit more in depth? I am very comfortable in blender, but have done very little with exporting animations out of there.

    • @ka_ekim7277
      @ka_ekim7277 8 หลายเดือนก่อน

      I take it back - i found it. Youre great.

  • @CCLawhon
    @CCLawhon 9 หลายเดือนก่อน

    I should have looked at your more recent ones first lol...but this seems like a good start and learning (I'm switching from Unity back to Godot). Thank you for this!
    @FinePointCGI I still can't get my actual player to turn left/right depending on direction he's moving. I don't know what I'm missing. I copied your code to be sure I didn't have a typo, and I didn't. The mouse rotation does also rotate the player somewhat, but he never "turns" right or left. I don't want to strafe, so I'm not including that part. I have looked and can't find anything on just that one part of "turning with movement direction." I'm sure you're busy but if you could reply with a quick word on how to separate the x to make the player turn right/left I'd be forever grateful.
    Notes:
    19:43 Alt F4 may not work on Mac dep on settings, so Command-Q will get you out of the game preview. Of course that quits it and you can't just refresh after--have to play from scratch. I think before we set up that feature, we should set up ESC to release mouse control? That was a panic moment being locked in game with no "escape" lol (and don't say use PC lol).
    Really had to play with LookAt[Cam] positions (1.5 on Y and -7.5 on Z) and SwingArm (.5 on Y) settings to get Player to not look below floor. The script settings only seemed to limit its view ABOVE the floor, but not below.
    Also 'Character character in CameraController Script wouldn't work...had to change Character to CharacterBody3D - CharacterBody3D character (guessing bc the player script says "Extends CharacterBody3D" at the top?).
    I asked Chatbot for "In Godot 4.1 3d, my camera looks below the floor. how do I limit its tilt" and it gave me Max and Min PITCH. Thoughts on this option? Seems much simpler to put it halfway up the player then use pitch than all the stuff here.
    In 4.1 I cannot change the advance condition...it's showing & sign and won't let me edit it. I can't keep going in your tutorial until I find the cause of that and I cannot even after an hour of searching😕 EDIT: AHAHAAA I had the window squished so I could see TH-cam & Godot at the same time...so the actual text window after the & wasn't showing/clickable. WOW. That's an hour of being an idiot I'll never get back lol.

  • @albthe7891
    @albthe7891 ปีที่แล้ว +2

    i kept getting Parser Error: The identifier "global_position" isn't declared in the current scope. ,
    though i thought i followed everything correctly :/

    • @albthe7891
      @albthe7891 ปีที่แล้ว

      just realized this is for godot 4 not 3 o_o

  • @TheWindfaller
    @TheWindfaller 7 หลายเดือนก่อน +1

    If i have chosen a mixamo animation that moves the character forward when doing the walking animation how would I prevent that?

    • @TheWindfaller
      @TheWindfaller 7 หลายเดือนก่อน

      this tutorial is amazing and everything works properly besides the animation moving the character away from the camera

    • @TheWindfaller
      @TheWindfaller 7 หลายเดือนก่อน

      Ended up having to go in the animations in blender and setting the Z Location variables to 0,0

    • @bengtrust
      @bengtrust 5 หลายเดือนก่อน

      when choosing a walk animation in maximo you can tick the box that says "In Place" on their website

  • @WeirdGoat
    @WeirdGoat ปีที่แล้ว +1

    Great video! Could you make this kind of 3D tutorials with C# or make a C# version, C# is really better when you make a 3D game on Mobile platform, thanks!

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +2

      I am currently editing this video for C#. Every video I do I try to do a C# version.
      That being said Godot 4 C# does not support mobile yet so id keep that in mind.

  • @skeletalhero
    @skeletalhero ปีที่แล้ว

    what would I need to change for the character to face the direction he's walking, instead of towards where the mouse is pointing? so instead of strafing right, my character will just face right, and when going backwards, my character will face the camera?

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +2

      I am going to be updating this tutorial soon to add this I just need to iron out some small stuff

    • @skeletalhero
      @skeletalhero ปีที่แล้ว

      @@FinePointCGI looking forward to it, thanks for your reply!

  • @PettankoNeko
    @PettankoNeko ปีที่แล้ว +2

    Around 21:00 minutes, adding the look_at() function, when moving the camera up it causes the screen to flicker and spams the error:
    "Up vector and direction between node origin and target are aligned, look_at() failed"
    The error is coming from the CameraController script, at the Camera3D's look_at() function. This only seems to happen when moving the camera above the character's head. Any idea how to fix this?
    I've also tried copy/pasting your code directly and I get the same error. I double checked my node set up as well and everything seems to be the same as yours in the video.

    • @PettankoNeko
      @PettankoNeko ปีที่แล้ว

      I've also noticed that when lerping the movement, when strafing, it causes the character to move in a forward-diagonal way. I could be mistaken but it looks like the same thing is happening in your video as well near the end. Is this intended? How would one set it up so the player only moves true left or right?
      Edit: Seems like you address this in your C# video by moving the LookAt node farther from the player.

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +1

      You may need to adjust the limits of your clamp that error usually means your camera is directly vertical above the player and your cameras direction and up vector can't be the same value.

    • @PettankoNeko
      @PettankoNeko ปีที่แล้ว

      @@FinePointCGI I don't know what I did, but I re-wrote part of the code and it's working fine now. I have no idea what changed or what I did wrong...oh well!

    • @PettankoNeko
      @PettankoNeko 11 หลายเดือนก่อน

      @@Bora42896 I don't know exactly what I did wrong originally. I just re-wrote the code again and it started working. I'm not sure what the problem was.

    • @arturszakss9053
      @arturszakss9053 7 หลายเดือนก่อน

      I'm having the same problem. Already checked the script and still can't see the problem :(

  • @rahmanlinux9602
    @rahmanlinux9602 ปีที่แล้ว +1

    Hi mr finepointCGI, can you make tutorial how to create fighting game like Mortal kombat??

  • @languagelearningexperience6814
    @languagelearningexperience6814 ปีที่แล้ว +1

    jesus that animation state machine is crazy. I could image it being really useful for smaller things but anything with interlinking transitions is just crazy. Would be unmanageable if you added more.

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +3

      I'm told there is sub statemachines so I'm going to look at them and see if that helps!

    • @languagelearningexperience6814
      @languagelearningexperience6814 ปีที่แล้ว

      @@FinePointCGI ow that would be awesome and make more sense. Great video as always by the way :-)

  • @mrdixioner
    @mrdixioner ปีที่แล้ว +1

    Why is there a small double jump during the jump before landing? This is also noticeable on the video, but the author did not say a word about it. I think this is a bug, but I don't understand why this is happening.

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +1

      I call it out in the video or at least I did in the recording. It's due to the idle fall animation I picked. This will not be an issue if the idle fall was designed to work with the land animation.

    • @mrdixioner
      @mrdixioner ปีที่แล้ว

      @@FinePointCGI I understand. Thanks!

  • @ztahcb2545
    @ztahcb2545 ปีที่แล้ว

    My springarm just does not work it is already clipped under the floor when I start and when I tried to move the CameraController node nothing changed and when I changed the position of the springarm it would appear as if the care is right above the players head like a first person and yes the collision masking is properly done but it just won't work

    • @mosscarpetart
      @mosscarpetart 6 วันที่ผ่านมา

      i had a similar issue and it was because i used a different model which had a completely different scale. So I had to change the boundaries of the clamp and also increase the SpringArm length by a lot.

  • @Nariusel
    @Nariusel ปีที่แล้ว

    Hi, what program are you using to display keystrokes?

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +1

      I use a tool called carnac!

    • @Nariusel
      @Nariusel ปีที่แล้ว

      @@FinePointCGI thanks

  • @user-qg4yg4py9j
    @user-qg4yg4py9j 8 หลายเดือนก่อน

    Все супер, только из-за функции lerp() мой персонаж подергивался во время бега (он иногда поворачивался на 180 градусов вокруг своей оси). Заменил на lerp_angle() и проблема решилась🥳🎉. Спасибо за видео.👍

  • @lutecemina2240
    @lutecemina2240 ปีที่แล้ว +2

    I don't know but I feel like the animation tree state machine is a lot harder to use than the 3.x

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +2

      It kind of is they want to make more adjustments but it didn't get in on time I'm told..

  • @JVinay
    @JVinay ปีที่แล้ว +1

    Sir please provide the character download link that you used sir please

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +1

      The character I used is owned mixamo you need to go into there character tab in the top right click characters. Underneath there should be a bunch of characters that you can use including the one I used in this video!

    • @JVinay
      @JVinay ปีที่แล้ว +1

      @@FinePointCGI i got that sir but the character is not having animation I try to add it but i can't make it properly so please make a new one with any character skin and send it's download link sir please.

  • @gabrielvinicius975
    @gabrielvinicius975 ปีที่แล้ว

    at 18:30 for some reason my Godot is saying "Node Not found: "LookAt" (relative to root/Node3D/MeshInstance3D)" i tried to copy everything that you did

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +2

      Double check the path to the node it's possible the look at node may be tucked under something else.

    • @gabrielvinicius975
      @gabrielvinicius975 ปีที่แล้ว +1

      @@FinePointCGI tyy it was the path node :D

  • @serendipinator
    @serendipinator ปีที่แล้ว

    I am pretty sure just using a blend tree greatly simplifies the issues you were having with the AnimationTree

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว

      Your probably correct however I ran into issues with having it properly transition state. I'm sure I'm missing something but that's why I didn't use it

    • @serendipinator
      @serendipinator ปีที่แล้ว

      I can’t really help you there but I know Devmar has done a lot of work with them in Godot 4 and you might be able to glean something from his videos or reaching out to him

    • @CopperFrance
      @CopperFrance ปีที่แล้ว

      You're right it's easier because you can put 5 animations in it (walk at (0, 1) and (0, -1), idle at (0,0), straifleft at (-1,0) and straifright at (1,0)
      and set the blend position with input_dir in the script :
      $AnimationTree.set("parameters/Walk/blend_position", input_dir)

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว

      It definitely is! I'm doing the root motion tutorial right now and I have converted to this method using a state machine and a blend 2D.

  • @mrkaratedo
    @mrkaratedo ปีที่แล้ว +1

    Will this tutorial have part 2 with more gdscript actions? 🎤

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +2

      I plan to add vaulting climbing running sneaking and adjusting the character system to only look at a place when you lock on. I may also add dodging as well

    • @mrkaratedo
      @mrkaratedo ปีที่แล้ว

      @@FinePointCGI It's good that you'll do part 2 with all that you've said. It will be great when it comes out

  • @CurlyEra
    @CurlyEra 4 หลายเดือนก่อน

    Bhai please please please please please please pura same yahi chij ki hai lekin joystick kese lau batado please 😢😢😢😢

  • @jcobreti
    @jcobreti 11 หลายเดือนก่อน

    Perfect but i think the player dont need to go back

  • @not_velsia
    @not_velsia ปีที่แล้ว

    If you name the animatios to "idle cycle" "walk cycle" and so on...they repeat by default.

  • @basiladeeb
    @basiladeeb ปีที่แล้ว +1

    That's a lot of coding for a simple action!

  • @Xeadriel
    @Xeadriel 11 หลายเดือนก่อน

    this looks so painfully finnicky. is there really no easier way to do this?

    • @FinePointCGI
      @FinePointCGI  11 หลายเดือนก่อน

      I have a follow on that shows a slightly better way to handle the animation transitions using 2d blending

    • @Xeadriel
      @Xeadriel 10 หลายเดือนก่อน

      @@FinePointCGI thanks for the reply.
      yes I found that solution later after commenting. What Im currently considering is maybe connecting several blend2ds with the statemachine instead or maybe replace it entirely with BlendTree as it seems to exponentially increase in complexity the more animations you have.
      it is faster to set up with few animations though.