Complete 3D Shooting Mechanics - Godot 4 FPS Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ย. 2024

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

  • @samwholearns3023
    @samwholearns3023 ปีที่แล้ว +66

    TIPS:
    1. Hold control while you click and drag a node from the scene hierarchy to the script to create a full @onready var
    2.There is a Translate() function that changes the nodes position. Could simplify the bullet movement slightly.

    • @legiongames2400
      @legiongames2400  ปีที่แล้ว +15

      Oh my god thank you LOL that's gonna save me so much time :D :D

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

      #1 for some reason doesnt work on mac :(

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

      @@neptun3189 try command

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

      @@legiongames2400are you sure you didn’t leave any major details out when spawning bullets? I’ve looked at this video countless and still can’t get them to show up even when I used nodes and code. Don’t dodge the comment.

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

      I tried this an the is_playing function returned null, crashing the game. I had to manually type $ name of 3d node attached to player / camera of player /...
      and then the animation player node and its animation appeared.

  • @chrisl7449
    @chrisl7449 ปีที่แล้ว +16

    Just started on the 3D game development journey in Godot and the 3 tutorials are super helpful. Thanks!

  • @supermario-N64
    @supermario-N64 ปีที่แล้ว +24

    Thanks for the tutorial! There is not many godot 4 tutorials so yours are a huge help to beginners

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

      Thank you, I'm glad you're enjoying my videos!

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

      @@legiongames2400 can you make a video showing how to make a player interact with rigidbody3ds and be able to pick it up and throw it?

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

      3d btw

  • @DubbleKoi
    @DubbleKoi 4 หลายเดือนก่อน +25

    I had a problem where my bullet had multiple problems, so here is my solution for future generations.
    The problems; my bullet spawned way over my head and fired in a direction that wasn't quite where I was looking but picked a direction relative to how rotated my camera was. the bullet also curved as I turned my camera mid-flight.
    the solution; I replaced "get_parent().add_child(instance)" with "get_tree().root.add_child(instance)". this gets the root node of your level and makes the new bullet a child of that.

    • @frawd
      @frawd 4 หลายเดือนก่อน +2

    • @JakeDallas-us7ht
      @JakeDallas-us7ht 4 หลายเดือนก่อน +3

      Thanks you!!! You fix My problem

    • @dhruvgajjar5265
      @dhruvgajjar5265 4 หลายเดือนก่อน +1

      Thanks man this fixed my issue

    • @adog3129
      @adog3129 2 หลายเดือนก่อน +1

      that seems like a much more proper way to do it in general, i thought it was kinda jank that he assumed the player would be a direct child of the world

    • @relvean5626
      @relvean5626 2 หลายเดือนก่อน +1

      You're a god damn hero!

  • @Blake.Bilderback
    @Blake.Bilderback ปีที่แล้ว +8

    This has been one of the most helpful tutorials I’ve found so far. Thank you!

  • @ChristopherSprance
    @ChristopherSprance ปีที่แล้ว +19

    These are incredible. I love how succinct they are. Keep this style up!
    This is some of the best godot content I've come across so far

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

    awesome workaround for the collision shapes of enemies. Thank you

  • @artiop7687
    @artiop7687 9 หลายเดือนก่อน +2

    PERFECT : simple, fast and very well explain for newbies

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

    You have a fantastic foundation to create a simple COD zombies game, maybe. i have near zero experience in game dev so i truly wouldnt know
    regardless, these tutorials are awesome

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

      yeah it was actually the inspiration for the series haha :D thank you!

  • @visualcortex7500
    @visualcortex7500 12 วันที่ผ่านมา

    After working with nodes in Unreal for a long time is't such a joy to see the real code. Thank you.

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

    This series is going really well!

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

      Thank you! :) Any other FPS topics you would be interested in?

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

      @@legiongames2400 close range Melee weapon would be a good idea I suppose :)

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

    Looking great, thank you. I’ve added sound and made it quite a bit darker. Very fun to shoot those undead.

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

      Nice, the bullets prob look cool flying around in the dark haha

  • @Rawrqual
    @Rawrqual 9 หลายเดือนก่อน +4

    I think the collision boxes now work with the animationtree without having to redo them. They reworked AnimationPlayer and AnimationTree between 4.1 and 4.2 so it could be related to that.

  • @andypandy-py1zc
    @andypandy-py1zc 6 หลายเดือนก่อน

    Another great tutorial with all the code working as it should.
    It is fast paced which allows you to put more ideas and solutions into the video without dragging on.

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

    Nice tutorial. GJ on being crispy clear on ur words!

  • @Max-sf8im
    @Max-sf8im ปีที่แล้ว +1

    What a legend, fantastic video mate, keep them coming.

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

    I liked this video months ago, but I keep coming back for top tips ♥

  • @D.E.Nicolas.Goncalves
    @D.E.Nicolas.Goncalves ปีที่แล้ว +1

    I recalled your video many times, so many good and essential stuff around it! Thanks for the knolage shortcut!!!

  • @zeeeeeeeeeev6493
    @zeeeeeeeeeev6493 11 หลายเดือนก่อน +2

    really helpful series, it would be nice if the video about enemies with skeletons had a warning that the 'generate skeleton' thing is kinda broken, i had problems with it as well.

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

    10/10 tutorials need more!

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

    God Bless you bro, this tutorial is amazing!

  • @akwasiasanteampong5103
    @akwasiasanteampong5103 ปีที่แล้ว +57

    I i hate the way people always rush to do stuff without letting viewers see it

    • @HarmonicHewell
      @HarmonicHewell 7 หลายเดือนก่อน +5

      I know right, really annoying!

    • @memze1148
      @memze1148 3 หลายเดือนก่อน +2

      fr, which is why you shouldn't get dependent on tutorials

    • @akwasiasanteampong5103
      @akwasiasanteampong5103 3 หลายเดือนก่อน +2

      @@memze1148 exatly

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

    When I press the fire button, the bullets aren't where the ray cast is. They also change position (On the Y axis) depending on where I am in the play space
    Bullet:
    extends Node3D
    const SPEED = 40.0
    @onready var mesh = $MeshInstance3D
    @onready var ray = $RayCast3D
    # Called when the node enters the scene tree for the first time.
    func _ready():
    pass # Replace with function body.
    # Called every frame. 'delta' is the elapsed time since the previous frame.
    func _process(delta):
    position += transform.basis * Vector3(0,0,-SPEED) *delta
    Gun:
    @onready var gun_animation = $Sketchfab_Scene/AnimationPlayer
    @onready var gun_barrel = $Sketchfab_Scene/RayCast3D
    var bullet = load("res://Scenes/bullet.tscn")
    var instance
    func _process(delta):
    if Input.is_action_pressed("Click"):
    if !gun_animation.is_playing():
    gun_animation.play("shoot")
    instance = bullet.instantiate()
    instance.position = gun_barrel.global_position
    instance.transform.basis = gun_barrel.global_transform.basis
    get_parent().add_child(instance)

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

    Your tutorials are amazing. I'm upset with myself for the ways I did things. Being new to Godot I did not know about "clear inheritance" and had no idea how to get hitboxes to be children of the bones. So, I grabbed the skeleton object in GDScript, found positions of two bones I wanted the hitbox between, and applied linear interpolation between them to place the hitboxes where I wanted. It looks a lot easier being able to make the hitboxes child nodes of the bones. lol

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

    Love the tutorials so far ❤

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

    You are an Excellent Teacher !

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

      Thank you friend! :)

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

      @@legiongames2400 Excellent Keep up the Great work . Thank you for the video .

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

    thank you man! you're a real life saver

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

    Love your tutorials man. Keep them up =)

  • @helter1234
    @helter1234 2 หลายเดือนก่อน +1

    Not sure who needs to hear this but you need to make sure the RayCast3D on your bullet is set to Collide with Area3D objects (do this in the inspector tab), otherwise the bullets will sail straight through the enemy hurtbox and do no damage.

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

      I love you so much you don't understand

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

    Great tutorial, thanks

  • @DJ-MKpL
    @DJ-MKpL ปีที่แล้ว +1

    nice if you did a weapon pick up and drop system. And thanks for this tutorial

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

    You have the best fps tutorials for godot thanks for sharing and contributing to the godot community

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

    The 8 guns joke was...very satisfying.

  • @tonnypedersen5915
    @tonnypedersen5915 ปีที่แล้ว +9

    only thing missing is multible weapon types and ammo to pick up

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

      What kind of weapons would you like to see?

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

      @@legiongames2400 the usual or something "fun" to take out zombies, like a chainsaw, scythe or a ladle 🤣

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

      melee, rockets and switching between them

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

      @@tonnypedersen5915 I freaking love chainsaws

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

    it looks great, thanks for sharing

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

    Could you make Other Projectiles tutorial? Maybe RPG with the Explosion please
    Also for a Tank or Jet or Ship firing the rockets

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

    Your tutorials are the best😎

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

    Great Tutorial Keep Going 💪

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

    10:25 well this is awkward now... in your previous tutorial you were only talking about the three animations "standup", "run", "attack", not about the "die" animation.
    How can I now add a fourth animation to the already existing model? If I reimport from blender, all the previous work (position track in standup, hit-frame in attack, animation-renaming) will overriden right?
    Can I somehow retarget an existing animation onto a different model (import 2nd zombie model just with "die" animation and then retarget to existing zombie)?

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

      Well I can tell you that the offical guide in the godot docs regarding animation retargeting... did not work for me ^^
      Godot does not seem to find the right bones unfortunately...
      What do I do now?

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

      I figured something out: If you wanna add a new animation to an already existing model, reopen the existing zombie.glb in Blender, then import the glb with the new animation (in this case "die") stash it into the NLA, and then when it its reimported in Godot you cann see the new animation there.
      Just for info: animation retargeting did NOT work for me, I had to do it this way...

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

      You can copy the animation keyframes into a new animation if you import another model with the extra animations.

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

      Figured out how to copy the animation keyframes to a new animation. You have to click the "Edit" -> "Copy Tracks" to copy it (took me forever to find this)

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

      @@asdfhjklacew How come the "Edit" button for this is greyed out for me? How do I enable it so I can copy the track?

  • @djdailydisco
    @djdailydisco 10 หลายเดือนก่อน +2

    With every bullet the memory goes higher and higher....

  • @shawnLittle-sq4nr
    @shawnLittle-sq4nr 3 หลายเดือนก่อน

    thank u very much i learn a lot

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

    What's better than 8 guns....
    Neo: "Guns, lots of guns."

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

    Your 8 guns joke convinced me to sub, like and keep the bell active haha 😂😂

  • @Ralfidogg
    @Ralfidogg 9 หลายเดือนก่อน +1

    Thank you

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

    very neat well done

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

    HUGE thanks ♥♥♥♥♥♥♥♥♥♥♥

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

    The Best!

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

    Awesome tutorial!! I'm just having trouble getting the bullets to start at the gun barrel. I've followed the tutorial closely but for some reason the bullets are not aligning with the gun barrel.

    • @OmarSalha-j7h
      @OmarSalha-j7h 7 หลายเดือนก่อน

      Use global_position instead position

  • @yoskokleng3658
    @yoskokleng3658 8 หลายเดือนก่อน +2

    which video you make animation for "die" ? i miss it. :))

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

    For some reason when I walk forward my bullets go in reverse here's my code: 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 * SPEED
    velocity.z = direction.z * SPEED
    else:
    velocity.x = move_toward(velocity.x, 0, SPEED)
    velocity.z = move_toward(velocity.z, 0, SPEED)
    move_and_slide()

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

    i had an issue where my bullet would spawn and immediately crash. i fixed it by replacing the movement in _process for the bullet with " translate(Vector3(0, 0, -SPEED) * delta) ". no idea why the other one wasn't working, but this does, and i think it's simpler anyway

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

    ارجوك رد علي ما هو الكود المسؤل عن تغيير جهة الرصاصة حسب الكاميرا ؟

  • @Mikael._
    @Mikael._ ปีที่แล้ว +3

    For me sometimes the collision wont trigger, using simple boxes and spheres on a level.
    From specific angles and distances the bullet collides correctly and sometimes couple inches to the side the bullet goes right through.
    Not sure this is a limitation of the engine for fast moving objects or i got something wrong.

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

      Hi, sorry if im a bit late, but for me making the raycast longer and lowering the bullet speed worked.

    • @Mikael._
      @Mikael._ ปีที่แล้ว +1

      @@kaliss6110 Yeah i did some of these changes but it really seems like a limitation of the collision shapes at higher speeds, since even with the bullet at really slow speeds it did skip some collisions but more rarely, i tested in a clean project with nothing except the bullet instantiation and it persists, since i mostly like to mess around with 2D games i ended up not searching a lot more.
      The things i did:
      Slow bullet, longer raycast, swap raycast for a collision shape and use signals, faster bullet (because why not), and changing some physics options in the project settings.
      The only thing really worked was wit scan bullets using a raycast, those detect correctly, i just spawn a instance of the particle where my raycast collides when i click.

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

      @@Mikael._ don't use the raycast, use the physics body. i'm using rigidbody because i want bullet drop so i can't tell you exactly what to do, but just detecting the collisions of that physics object worked for me, after i couldn't get the raycast to work reliably.

  • @AnesPro0
    @AnesPro0 9 หลายเดือนก่อน +1

    can u make a Tutorial for a 3rd person shooter (Tps) ?

  • @Knightingraphitearmour
    @Knightingraphitearmour 2 วันที่ผ่านมา

    Loved this video for the tutorial but got stuffed over on the particle bit. I'm trying to change the direction in the process material at 5:42 but for me I don't have that as an option in the inspector. can someone please help, how do i change the direction

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

    Nice tutorial! Are we getting anymore content in this zombie-shooter series?

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

      No plans atm. Not because I'm not interested in doing more, just not sure what people would want to see. What other FPS topics would you like me to cover?

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

      @@legiongames2400 Here are some suggestions! Different weapons, wave based combat, upgrades and perks, different enemy types, nav mesh links, ammo count. Maybe you could take a look into one of those?

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

      @@legiongames2400 Range-based enemies and more gunplay stuff would be interesting. (Shotguns melee etc) Perhaps aesthetic stuff like bullet impacts and footstep sound effects? I don’t mean to overwhelm, I hope these give you some ideas!

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

      Ooh! May I also recommend ragdolls?

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

      @@catjox_45 That's a lot of ideas, thank you. I think I will take a look at some of those like more weapons and ranged enemies. Ragdolls I really wanted to get done for this one but the physical skeleton breaking kind of threw a wrench in my plans so probably worth revisiting. Seriously, thank you haha

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

    How would you handle bullet drop, with projectiles using just a 3d node?

  • @jinyuchan3983
    @jinyuchan3983 9 หลายเดือนก่อน +1

    Sometimes the bullets just hit the floor without showing the particles. Is there a reason for this?

  • @officalminereal_gamer
    @officalminereal_gamer 9 หลายเดือนก่อน +1

    when i run the game the bullets only colide some times only i tried every thing but its not working????😥😥😥😥

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

    Would you also be going over animations for the gun?

  • @ESousa-dn4vs
    @ESousa-dn4vs 7 หลายเดือนก่อน

    Can you do a tutorial of blood particles when you hit an enemy?

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

      Did that in my hitscan tutorial video

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

    i used marker instead of a raycast for gun's barrel.

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

    I have a doubt. If the fps goes down, maybe the bullets pass through the enemy and other colliders?

  • @Gerex_001
    @Gerex_001 3 หลายเดือนก่อน +2

    if Input.is_action_pressed("shoot"):
    if !gun_anim.is_playing():
    gun_anim.play("shoot") bro this thing didn t work

    • @Gerex_001
      @Gerex_001 3 หลายเดือนก่อน +1

      Línea 39:Unexpected "if" in class body.
      Línea 40:Unexpected "Indent" in class body.
      Línea 41:Unexpected "Indent" in class body.
      Línea 43:Expected end of file.

    • @Aaylias
      @Aaylias 17 วันที่ผ่านมา

      @@Gerex_001 Have you fixed this? If you haven't, elect that whole section and press tab, it will indent the text so it will go from
      if Input.is_action_pressed("shoot"):
      if !gun_anim.is_playing():
      gun_anim.play("shoot")
      to
      if Input.is_action_pressed("shoot"):
      if !gun_anim.is_playing():
      gun_anim.play("shoot")
      Hope this helps :)

  • @sitsnay982
    @sitsnay982 9 หลายเดือนก่อน +2

    what to do if it reports an error that there is no function is_playing in the code: if Input.is_action_pressed("shoot"):
    if !gun_anim.is_playing():
    gun_anim.play("Shoot")
    instance = bullet.instance()
    instance.position = gun_barrel.position
    instance.transform.basis = gun_barrel.globale_transform_basis
    get_parent().add_child(instance)

    • @thereissomethingwrong8440
      @thereissomethingwrong8440 5 หลายเดือนก่อน +1

      im getting the same error

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

      me to

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

      @@stefanbiedron4021 you need to ensure that "gun_anim" is a variable in your script. This variable would be the animation player, which when dragged in, is called "animation_player" and looks like this:
      @onready var animation_player: AnimationPlayer = $AnimationPlayer
      If you rename that variable to "gun_anim", it should work.

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

    How can I use function "is_playing" on AnimationTree?

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

    I JUST NEED TO KNOW HOW TO MAKE THE BULLETS APEAR AND GO FOWARD

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

    I am having an issue where my player now just moves when moving the camera in any direction

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

      no problem , got it , it was cause my gun collider was colliding with my player collider

  • @Tyl3r-Off1cial
    @Tyl3r-Off1cial 3 หลายเดือนก่อน

    How do I make specific Huns do different damage

  • @ItsTac0-zmic
    @ItsTac0-zmic ปีที่แล้ว

    The 8 guns got me 😂😂

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

    i mean, why not use the animation player to just queue_free the zombies? you can call methods from the tracks themselves, you just have to set the condition to play and save a few lines of code with no timers and anything

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

      Yeah you right, might as well have done that

  • @QqQq-bf8bd
    @QqQq-bf8bd ปีที่แล้ว +1

    i make 3d fps game for mobile, but i will try to play in mobile ,
    i will touch(swipe) mouse motion only, it will work properly, and i will touch (move) joystick only, then joystick work properly, but i will use both of them, first i will touch mouse motion and after touch joystick, both of them work properly but first i will touch joystick and after touch mouse motion , joystick will work but mouse motion not work, 😢😢how to solve please help

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

    can you pls make tutorial for weapon system so can easily add more type of weapons

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

    been trying to make a 3rd person shooter and its just not happening. not sure why, even with testing everything logically is there, but nothing works
    EDIT: after bouncing back and forth with a legend of a friend, i have concluded that you must not adjust the transform of your main root node. and also, printing positions of your instance and or players was a huge help in finding my issues
    example:
    print(position)
    print(instance.name)
    print(instance.position)
    print(instance.global_position)

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

    Z is depth so doesn't it kind of track that it represents the objects distance from the screen instead of up and down like blender? In 2D Y is vertical and X is horizontal, converting to 3D is just adding the element of depth or Z. This is one of those things that should really be developed according to one standard just like introducing a system of measurement or adding right angles.

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

      People who made Blender like strategy games too much. :D

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

      @@legiongames2400 lol

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

      yeah, it was an awful decision from the godot devs. they defend it by saying there's no standard, but their examples are really cherry picked, almost everything uses z-up.

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

    why douse my bullets shoot horizontally?

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

    Help my bullet phases past objects then on the other side explodes into particles.

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

    Question can you import gun animations from blender?

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

    My particles only emit a fraction of the time. Most hits don't emit, even though it is colliding. Any idea what I'm doing wrong?

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

      That's a weird problem, I'm blanking out tbh. What's your bullet velocity? Also what's the particle velocity?

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

      @@legiongames2400 i believe its the weapon speed or the raycast 3D not working correctly as if i slow down my bullet speed it works more than if i increase it, any fixes?

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

      same problem here. going to mess with the raycast length and collision layers.
      EDIT: Lowering the speed and increasing the raycast length worked.

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

    Amazing!!! can u add audio to it??

    • @Shawn-cq7qy
      @Shawn-cq7qy 3 หลายเดือนก่อน

      U should just add the sound when u push the shot button if u know what I’m trying to say lol

  • @CoolDude-g4r
    @CoolDude-g4r 3 หลายเดือนก่อน

    I can't change the materials on the models for some reason. When i try that it says that i cant change materials on imported models. Does anyone know how i can fix this? Because i've seen other people do it

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

    When the player is strafing, the rifle muzzle raycast is offset (to the left if strafing left, to the right if strafing right), before lerping back to its position (only after the pressed button for strafing is let go). Does anyone know how I could solve this issue?

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

    Question, i just finished the body part script, and it works with headshots which the original signal and stuff is attached to, but whenever i hit a non head body part, it crashes and says
    "Invalid call. Nonexistent function 'hit' in base 'Area3D'
    im confused and not sure what is wrong here, how did he set up the signal again? he did it so fast maybe i did something wrong

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

      I got the same issue, if you figured it out let me know!

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

      im a total goober and didnt realize this, he skipped over it, but you are supposed to attach the same script and signal to every body part, look at the before and after of him saying so @@themindlesstruffle

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

      I had a script attached to every area 2D with a hit function that passes it on to the the parent enemy script. Thank you for watching!

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

    Please help the following line from the bullet just does nothing at all, the bullet spawns but doesn't move,
    position += global_position * Vector3(0, 0, -SPEED) * delta
    I tried adding a print(position) below this to have it print it's position, more to see if it was even running the code in the script, but IDK if that is a valid way of doing it, but if it is it seems like once it's spawned the code on the script isn't running?

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

    🔥🔥🔥🔥🔥

  • @bananabarddev
    @bananabarddev 8 หลายเดือนก่อน +1

    I can't put the bullet speed to high, more than 40 and the bullets are not colliding, it probably has to do with the raycast not detecting the collision thanks to the speed?
    I would like the bullets to travel faster, so it's less time to make it to the enemies.
    If someone know what it could be, I would appreciate the help.

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

      hey, i was having this problem and i could fixed it adding this line of code before the if on the raycast.is_colliding():
      it should look like this:
      raycast3D.force_raycast_update()
      if raycast3D.is_colliding():

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

      @@revn45 Thank you very much, had the problem that some of my bullets just didn't collide with the floor and that fixed it.

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

      @@revn45 thank you!!!!

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

    dude, like seriously, the eight guns thing makes this look like a mech game. and honestly, you would probably have a minor successful game if you make an 8 guns game where you can shift out each gun depending on their energy usage, size, weight and recoil for instance. Making it such that players have to make decisions on which guns to bring and so fort and each gun should obviously have a specific use such that it actually matters. then you can add on top of that mech parts like legs, reactor, shield and so on such that you have to balance your mech to support the guns. and then of course add tons of zombie mech enemies players can demolish for fun.

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

      I should be paying you that's a whole game right there LOL

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

    Is there an easy way to transform the keyboard and mouse input to a simple controller input script?

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

      Controllers are a little trickier with partial inputs on the different axis for walking, so it might be easier to write the controller script first and then transform that to support the keyboard.

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

      @@legiongames2400 cheers I will give that a try

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

    May I ask where does the player scene come from? Many thx ❤

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

      I made a first person character controller tutorial, it's basically built on top of that.

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

    How do you combine all the scenes into one called world, and also can you use arms to holding the ❤nice video by the way❤

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

      What do you mean by combine the scenes?

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

      @@legiongames2400 nvm I figured it out, by the way do you any discord group bro? Iam currently working on a similar game (iam a beginner)

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

      @@who_tf_asked Yeah theres a link to the discord in the video description!

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

    the engine is telling me that the function instantiate doesn't exist any idea how to fix it? because you're using it to spawn them in

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

      What version of Godot are you using?

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

      @@legiongames2400 at the @onready bullet I had put the wrong thing from resources after i copied the correct one in it worked

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

      I am using the latest and getting the same problem
      @@legiongames2400

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

      @@BoiNatty I hate it everytime Godot gives me an error just because I'm using a slightly newer version, all this error happening because of version difference, If you don't want error, you have to use EXACT same version as the version that the tutorial is using, so basically you need 5 months old version of Godot if you don't want any error, typical Godot problem, Godot keep change everything each version I hate them

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

      @@999dunkins instantiate() hasn't changed for like 3 versions though
      ur probably just using it wrong

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

    my bullets are getting stuck midair and colliding with nothing :c as soon as i added the collision code

    • @Shawn-cq7qy
      @Shawn-cq7qy 3 หลายเดือนก่อน

      Try to rewatch it and try to do it all over again and maybe that can fix it or if u fix it already lol

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

    Can you add a melee weapon?

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

    The vids are awesome. But next time please use simple assets

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

    Hi
    Which programing language use in this engine c plus or c sharp or both of them are use in this engine and if we know just one programing language is it benefit for use godot or not.

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

      This tutorial is in GDScript. Godot has a lagging support for C# and as far as I know there's an extension for C++.

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

    I did everything as in the video, but at 5:08 my pistol cartridges do not fly out

    • @Shawn-cq7qy
      @Shawn-cq7qy 3 หลายเดือนก่อน

      Try to redo the vid maybe u miss some thing and the vid go’s fast so it can be easy to miss something

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

    bullets hits enemies but they dont die

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

    super))

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

    how to make artillery in godot plis help

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

    so it doesn't work in godot 4.1? i can't seem to find the "get_simple_path". is there another method for it?