Gun Muzzle Flash // Make An FPS in Godot 4 (E28)

Sdílet
Vložit
  • čas přidán 31. 05. 2024
  • In this tutorial, we're adding a procedural 3D muzzle flash to our weapon for our Godot Engine FPS project and taking a first look at the Godot particle system.
    🔥 GET THE SOURCE FILES ►► / stayathomedev_
    👉🏼 FREE BASIC FPS SETUP SOURCE FILES ►► stayathomedev.itch.io/basic-f...
    -----------------------------------------------------------------------------------
    ✅ Basic FPS Setup Video ►► • Make An FPS in Godot 4
    ✅ FPS State Machine ►► • E07 - State Machine In...
    -----------------------------------------------------------------------------------
    0:00 Intro
    0:39 The Plan
    1:15 Setting Up Nodes
    2:08 Adding the Muzzle Flash Script
    2:59 Creating the Variables
    4:26 Assigning Node References
    5:00 The Muzzle Flash Function
    7:18 Connecting to Weapon Fired Signal
    8:46 Testing the Signal
    9:15 Positioning the Muzzle Flash
    10:03 Adjusting Light Color (Why I Hate the Color Picker)
    11:04 Creating the Muzzle Particles
    14:46 The Particle Time Options
    16:10 Creating the Particle Material
    17:32 Adding Transparency
    18:10 Adding Emissive
    18:59 Adding Random Rotation
    20:14 Final Test
    20:42 Get the Source Files
    21:03 More FPS Tutorials
    -----------------------------------------------------------------------------------
    This series is part of my sponsored Godot FPS Project where we will walk through how to create an 3D FPS game in Godot 4, step by step. I won't be skipping any steps in the process and everything will be sequential video to video.
    This initial basic FPS setup project is available for free to download and use using the MIT license via the link below. For all future videos, the project source files will be available to my GitHub Sponsors.
    Joining my Patreon in one of the 3 tiers will give you:
    - access to the private Discord channel
    - your name in the project README
    - early access to tutorial videos
    - power to vote on what mechanics get covered in future videos
    - full access to the project source files to use in your own projects
    -----------------------------------------------------------------------------------
    STAYATHOMEDEV ►► stayathomedev.com
    TWITTER ►► / stayathomedev
    GODOT ASSET MARKETPLACE ►► godotxc.com/
    #godot #godotengine #fps
  • Hry

Komentáře • 17

  • @IceNineOcean
    @IceNineOcean Před 11 dny +2

    I imagine next we're going to go back and flesh out the weapon state machine? I imagine we want to connect the muzzle flash position to the weapon resource to tie into our modular workflow, and fleshing out the weapon state machine also would enable us to fire the gun outside of the idle state without cluttering up the other states with temp code. Either way, love the series, probably the best 3D Godot tutorial series I've found on here!

  • @lukabrasi001
    @lukabrasi001 Před 15 dny +6

    while this is a very good method, i feel like you should do a muzzle flash scene, set the particle to play on ready, and start a scene tree timer or await the gpu particle.finished signal to queue free the scene. this way you are not bound by the rate of fire for example, and you have a lot of modularity as well

  • @Bad.At.Guitar
    @Bad.At.Guitar Před 3 dny

    Im finally caught up!
    Btw if anyone else had their muzzle flash flying off if your character is moving, go to your GPUEmitter node -> Drawing -> Local Coords to true. Don't know if i just missed it in the video, but it makes a huge difference. Thank you again dude for the series

  • @relevart6491
    @relevart6491 Před 4 dny

    Hey, one tip: the signals can be connected from the Node option, you don't need to keep the _ready() and the export variable of the weapon controller. Also, I would add a variable in the weapon resource to mark it for melee or firegun, then pass that variable thru the signal so the recoils and flashes can be avoided

  • @Funtaman
    @Funtaman Před 11 dny

    Awesome tuts! thanks for your effort to make this. This is getting better and better :) i can't wait for the next one - i guess - gun sound? :D.. thanks again rock on!

  • @Komradenter
    @Komradenter Před 5 dny

    this tutorials are sick, keep it up

  • @SovereignVis
    @SovereignVis Před 13 dny +1

    Interesting, 🤔but I think I will stick with using Effekseer to do all my effects. 😅

  • @clewis4744
    @clewis4744 Před 11 dny +1

    I guess sound is next as someone already said.
    What I am trying to workout is how do you make the weapon system more generic and modular (which I think is definately the intention) esp using the weapon resource already setup.
    I'd put the recoil params in the weaon resource and let the recoil script get the params as we already pass in the weapon node for the fire signal.
    I can't figure out how you would deal with effects.
    Thank you so much.
    You have structured your course so it gives people ideas rather than giving the whole answer in one go.
    It gives people the opportunity to learn for themselves, which is more fun.
    Excellent tutorial.

    • @asdfghjkl-jk6mu
      @asdfghjkl-jk6mu Před 2 dny

      exactly, i see a video and i'm always like "oh good idea! i'll add this! but there's a better way to do this..."

    • @stayathomedev
      @stayathomedev  Před 2 dny

      There are definitely many ways to achieve the same thing and not one "right" way. I have been trying to work through the process of planning it in the tutorials so that process is visible. But i could go back and redo the whole series and it could be different.

    • @asdfghjkl-jk6mu
      @asdfghjkl-jk6mu Před 2 dny

      @@stayathomedev it's ok i still enjoy your videos. they give me a lot of insight on how other people would go about implementing, which i love, and learn something new as well. like i didn't know how to create muzzle flash effect or any particle effects in godot so it helped me with that

  • @marko95g
    @marko95g Před 15 dny +1

    I can't wait to play this game :D it will be revolutionary

  • @umen2424
    @umen2424 Před 13 dny +1

    Very good ! , when do you plan to do enemy animation and and levels loading ?

  • @stayathomedev
    @stayathomedev  Před 15 dny +1

    🔥 GET THE SOURCE FILES ►► www.patreon.com/StayAtHomeDev_
    👉🏼 FREE BASIC FPS SETUP SOURCE FILES ►► stayathomedev.itch.io/basic-fps-controller

  • @user-fl5hz1il7m
    @user-fl5hz1il7m Před 15 dny +1

    Great videos! In my project I tried to do lean left , lean right and you wont believe how hard it is. Impossible difficult to figure out mouse movement properly. When I move mouse left,right it moves relative to the map left right. An when I move mouse up down it moves normally up down (relative to camera). And I was surprised that normally the first person shooters when you are leaned, the mouse, moves camera relative to map, it doesnt move the camera like when you are standing upright. (I mean in Rainbow six , when you turn with mouse left right, leaned, it follows the horizon , which is tilted)

    • @Achilleas90
      @Achilleas90 Před 15 dny +1

      It all seems simple until we try it. Keep working through the problems and you will be an experienced dev in no time!

    • @user-fl5hz1il7m
      @user-fl5hz1il7m Před 14 dny

      @@Achilleas90 Yeap I figured it out. When you rotate by rotate_y(-deg_to_rad(event.relative.x * mouse_sensitivity)) it uses the parents local axis! I had to use rotate_object_local(Vector3(1, 0, 0), deg_to_rad(-event.relative.y * mouse_sensitivity) ) ..to use the nodes local axis and not the parents. (I mean if the child is rotated, then its completely different rotation using one or the other)