Make An FPS in Godot 4

Поділитися
Вставка
  • Опубліковано 6 лют 2025

КОМЕНТАРІ • 275

  • @colin_greens
    @colin_greens 10 місяців тому +9

    Cant wait to work through this!

    • @stayathomedev
      @stayathomedev  10 місяців тому +2

      Wow! Awesome! Thanks!

    • @TRFWINGS
      @TRFWINGS 7 місяців тому +1

      20 bucks?!!!!????

    • @huh48894
      @huh48894 Місяць тому

      @@TRFWINGS yeah, same.
      20 BUCKS!?!?!|?

  • @uheartbeast
    @uheartbeast Рік тому +102

    This is such a well-made tutorial. Thanks for sharing this and for all the hard work you put into it.

    • @stayathomedev
      @stayathomedev  Рік тому +12

      Hey!! Same to you and your tutorials! Thanks I really appreciate that, having fun in all honesty.

  • @papa_boogy
    @papa_boogy Рік тому +76

    For anyone struggling with the character not moving when pressing WASD, in the project settings you have to actually bind the keys to the commands using the "+" to the right of the action.
    After that it should work great!

    • @stayathomedev
      @stayathomedev  Рік тому +13

      Thanks for pointing that out. Oversight on my part!

    • @DemolishCentral
      @DemolishCentral Рік тому

      Thank you, I redid my project three times trying to get it to work.. lol

    • @vickiesshuttercraft
      @vickiesshuttercraft Рік тому

      So Many thanks,

    • @cholasimmons
      @cholasimmons Рік тому +4

      yea there's a lot of small useful bits that got cut out, i thought maybe i just missed them, like the CameraController accepting data type "Camera3D", instead of Node3D

  • @stayathomedev
    @stayathomedev  Рік тому +8

    👉🏼 PROJECT SOURCE FILES ►► github.com/StayAtHomeDev-Git/FPS-Godot-Basic-Setup
    👉🏼 BECOME A SPONSOR ►► www.patreon.com/StayAtHomeDev_
    *Had to switch to Patreon from GitHub Sponsors

  • @adomadeira
    @adomadeira Рік тому +161

    For newbies and beginners to be able to follow along it would have been nice if you showed how to add the environment and light to the scene, for beginners it might not be so easy to find. This series is promising! Looking forward to the next episodes! Cheers!

    • @stayathomedev
      @stayathomedev  Рік тому +58

      Will definitely be covered at some point! The WorldEnvironment node is kind of a beast of a node. Plan is to keep videos very focused so there isn't "information overload". It definitely deserves its own video.

    • @HevonCZR
      @HevonCZR Рік тому +3

      @@stayathomedev Will wait for this one!

    • @MidnightHorrors666
      @MidnightHorrors666 Рік тому +1

      Yeah, I would love to know how to make a foggy night sky box with a big moon.@@stayathomedev

    • @IceWolve67
      @IceWolve67 Рік тому

      LegionGames has a video exactly on that, if your aim is to make a "creepy" map. Not sure how up to date it is tho @@MidnightHorrors666

    • @BW-ye6mx
      @BW-ye6mx 11 місяців тому +1

      How would you make that cameras work with user right stick on a PS4 controller? That's the only thing I'm missing.

  • @IceWolve67
    @IceWolve67 Рік тому +6

    I have watched many tutorials and most of them just code without explaining hte logic, or use. You got to be the most clear and beginner friendly tutorial out there ! :D

  • @ClintCarlson
    @ClintCarlson Рік тому +3

    Just the series I was looking for. I'd been doing intro tutorials for a while and I find the pace and content of this to be more advanced and quick. I wouldn't be able to hang if I hadn't been doing tutorials for 3 months and I appreciate this sort of forcing me to branch out and keep up. Thank you thank you thank you!

  • @mbg4681
    @mbg4681 Рік тому +17

    I have immense respect for your decision to open-source this fundamental project! There could be no better introduction to the Godot community, nor a better welcome for devs moving beyond closed-source ecosystems. It also pairs well with your paying ventures to help support the channel. Kudos and keep up the good work!

    • @stayathomedev
      @stayathomedev  Рік тому +2

      Thanks, I really appreciate that! Yes, patrons get full access to everything to use in their own projects.

  • @president-bird
    @president-bird 4 місяці тому +1

    Thanks!

  • @mrmunkee
    @mrmunkee Рік тому +31

    For "@export var CAMERA_CONTROLLER : Camera3D" I used Node3D instead of Camera3D, I did this so that I can select the CameraController node (which it looks like you actually have selected in this video, which isn't possible while following your directions, at least in the newest version of Godot (4.2.1)). I did this so that the vertical movement of the camera can have a rotation point separate from the camera. Many games have the camera tilt from a point below it, like as if it's the character's neck or waist that it's rotating from. I don't know if this will conflict with things you do down the line but that's what I did to get it how I wanted.

    • @lostsignal2503
      @lostsignal2503 11 місяців тому +9

      I did the same as you lol
      He never points it out in the video, but after explaining to use Camera3D, you can see he changed it to Node3D just before he scrolls away

    • @isaacyauk2966
      @isaacyauk2966 8 місяців тому +1

      I had the same problem. Thanks for the comment!

    • @3Dberto-ec6it
      @3Dberto-ec6it 7 місяців тому

      Same for 4.3.x

    • @fandombr2475
      @fandombr2475 Місяць тому

      I get CAMERA_CONTROLLER = null even when changing Camera3D to Node3D

  • @sanketsbrush
    @sanketsbrush Рік тому +3

    yes ! Now this is what I am talking about. Finally, a tutorial video by SAH !

  • @gandewaarjuna6855
    @gandewaarjuna6855 Місяць тому

    I Can't Believe This As A Kid Who Codes This Is The *Only Godot Tutorial That Works,* Like Theres No Other Tutorial Like This Keep Up The Good Work ❤❤❤😊😊😊

  • @joshuamorris1851
    @joshuamorris1851 Рік тому +14

    Love this! In a (much?) later episode, I'd love to see how you tackle the world environment node, lighting, and graphical settings. Those looking to create an FPS typically want it to be a little higher up on the graphical scale (though, certainly not all), and some of the hardest resources to find are how to make 3D Godot look good because the settings out of the box simply aren't set for higher fidelity - which leads many to think 3D graphics in Godot are bad - when in fact you just have to set the settings accordingly and its a bit more manual setup.

    • @stayathomedev
      @stayathomedev  Рік тому +6

      Absolutely! There is a lot of power there, it just doesn't come out of the box like Unreal.

  • @DrW1ne
    @DrW1ne Рік тому +5

    Damn, that's a cool fps controller, good job.

    • @stayathomedev
      @stayathomedev  Рік тому +2

      Thanks! Just the beginning. Lots of features and mechanics planned, and will document everything with the tutorial series.

  • @RustRizzler
    @RustRizzler Рік тому +4

    Thank you for this tutorial series, as a beginner unity developer who was 6 months in development I lost alot of faith in unity.

  • @ThatGauss
    @ThatGauss Рік тому +23

    Okay so I'm following the tutorial but it doesn't work at the camera, I keep getting invalid get index 'transform' on base nil. Idk how to fix pls help

    • @xephyr1171
      @xephyr1171 Рік тому +33

      Was stuck here too. Someone answered it a few comments ago - go to the Inspector of your CharacterBody3D and where it says Camera Controller, select Camera3D

    • @ThatGauss
      @ThatGauss Рік тому +3

      @@xephyr1171 just fixed it, tysm

    • @pseeex
      @pseeex Рік тому +4

      @@xephyr1171 apreciate you!

    • @ForgottenMovieGems
      @ForgottenMovieGems 15 днів тому

      My cam era is stuck in a single orientation even after trying this. Anyone got a fix?
      EDIT: I had indented my code wrong so that the _update_camera function only updated when the controller was not floored

    • @deltabrolive
      @deltabrolive 6 днів тому

      ​@@ThatGauss Where did you do it please help me

  • @jeremycarmonacordero5137
    @jeremycarmonacordero5137 9 місяців тому +1

    this is a very well made video, just watching it makes u feel good due to its really nice editing, thank u lots

  • @DrRumsmuggler
    @DrRumsmuggler Рік тому +16

    Just throw it out there but keeping your code on screen for an extra sec is very helpful for us following along. Great video though I like the series so far

  • @picklepopsickle
    @picklepopsickle 6 місяців тому +1

    never seen a tutorial so well organized

  • @Marandal
    @Marandal Рік тому +3

    I love how you mentioned modern FPS then showed Half-life 2 ❤

  • @flinfaraday1821
    @flinfaraday1821 11 місяців тому

    You did something really great here! Thank you.

  • @bobojenkins5805
    @bobojenkins5805 10 місяців тому +8

    dude just breezes over stuff because he gets it and doesnt put himself in the shoes of someone seeing it for the first time

  • @literallyap0tat0-q7q
    @literallyap0tat0-q7q 5 місяців тому +1

    Wake up babe, new pronunciation of Godot just dropped

  • @Talktodiv
    @Talktodiv Рік тому +3

    Thanks for this sir 🎉

  • @inkraktare
    @inkraktare Рік тому

    This is fantastically helpful.
    Thanks for all the information.

  • @DoggoDebugger
    @DoggoDebugger 8 місяців тому

    Great stuff! just started to learn Godot and will probably hop back in once ill be abit more familiar with the basics for a follow-up of this!

  • @dudemannxs
    @dudemannxs Рік тому

    This is outstanding! Love your work sir!

  • @aztekdev
    @aztekdev 11 місяців тому +1

    Thank you for making such an incredible tutorial series. Your pacing, and the amount of information in each video are perfectly succinct. Thank you, please keep it up! Waiting every day for the next video to be visible! 🙂

  • @JayFolipurba
    @JayFolipurba Рік тому +5

    Did he mention that you have to select the Camera3D in the exported part of the inspector

  • @MrxDaffy
    @MrxDaffy 10 місяців тому +3

    in your script you have @export var CAMERA_CONTROLER:Camera3D and you said that it should Camera3D and than it it silently change to Node3d which is correct type. This is not my first FPS Controler i am doing so it is easy for me to spot this, but for begginers it can be quite confusing.

    • @apofex
      @apofex 10 місяців тому +1

      Can you say why mouse isn't track?
      Thank you in advance.

    • @MrxDaffy
      @MrxDaffy 10 місяців тому +1

      sorry, but without code or error message at leats is imposible to tell. @@apofex

  • @HevonCZR
    @HevonCZR Рік тому +2

    Thanks a lot for this!!!

  • @lukabrasi001
    @lukabrasi001 Рік тому

    ah yes, my favorite FPS controller feature, the Real-Time Reflection probes BEFORE capturing the mouse

  • @megafan1533
    @megafan1533 4 місяці тому

    Thanks dude, actually really helped.

  • @umen2424
    @umen2424 9 місяців тому +6

    Please add explanation on those 2 line
    CAMERA_CONTROLLER.transform.basis = Basis.from_euler(_camera_rotation)
    global_transform.basis = Basis.from_euler(_player_rotation)
    why you decide to manipulate the Basis and not the rotation

  • @DAIO_SAN
    @DAIO_SAN Рік тому +2

    It's always amazing to dive into something new. Nobody can take Godot from us - so learning it is no bet on some "benevolent" company. Thank you for the video! 👍

  • @Rikikiz
    @Rikikiz Рік тому +7

    Very good tutorial Godot really needs more 3D content like this !

  • @생강차生薑茶
    @생강차生薑茶 Рік тому +1

    I learned a lot! Thank you 🤓

  • @codyhop1
    @codyhop1 Рік тому +4

    I just started working with Godot and it's been great, I'm glad to see more tutorial videos with the engine. I haven't found a tutorial for how to filter over a 3D camera, like what those PS1-style horror games do. I've only found old videos for 2D games, It would be great if there was a tutorial.

    • @stayathomedev
      @stayathomedev  Рік тому +1

      Like a post processing effect?

    • @codyhop1
      @codyhop1 Рік тому

      @@stayathomedev Probably, honestly I don't really know what it is or is called. I just started with CS and deving so I'm pretty new too it, but like the closest thing I saw was some dude using a shader to pixelize a 2D sprite.

  • @DrW1ne
    @DrW1ne Рік тому +3

    I just got there, i hope i'll get something like stairs climbing and slide and collide function.

    • @stayathomedev
      @stayathomedev  Рік тому +4

      Going to try to cover as much as possible as it progresses. Will try to branch out realistically to new topics as we create a solid FPS controller than you can also customize to your needs.

    • @DrW1ne
      @DrW1ne Рік тому +1

      @@stayathomedev good luck!

  • @BaconEggsRL
    @BaconEggsRL Місяць тому

    Great vid although I wish some concepts of how the code works were more thoroughly explained (euler basis, transform, y axis is up and z axis is through the screen, so player rotation is rotation about the y-axis, and camera tilt is rotation about the x-axis, etc. )

  • @OnelineNight
    @OnelineNight 4 місяці тому

    This is great! Thank you!

  • @Alexander_Meyer
    @Alexander_Meyer Рік тому +1

    Thank you for this

  • @bestassistantgordonramsaye9557

    Great tutorial! I have a question though, you have set the type hint of the CAMERA_CONTROLLER variable to Camera3D, yet you reference the CameraController node which is a Node3D, I can't replicate this, nor does it make sense to me. Thanks for the video nevertheless!

    • @stayathomedev
      @stayathomedev  Рік тому +3

      Ah! Yes, I must have had the footage wrong. Node3D works fine, so you can reference either. But I will reference the parent node and not the actual camera node. So not Camera3D

  • @BigBWalter
    @BigBWalter 9 місяців тому +2

    Thanks for this tutorial, this is fantastic! Something I did notice with this though is that the mouse sensitivity winds up being tied directly to the frame rate. Because the `_unhandled_input()` method runs every frame, it store the mouse movement based on how far it's moved since the last frame. With a higher frame rate, this directly results in the mouse movement variables having a smaller value, which means that when the `_physics_process()` runs it will move the camera/player less than it would with a lower frame rate. I was able to verify this by coding in a max frame rate toggle that would alternate between running at 60fps and 360fps.
    I think you can avoid this frame rate dependency by moving the camera movement logic into the `_unhandled_input()` method, but I am new enough to Godot that I'm not certain if there would be any downsides to doing it that way. Please correct me if I've missed something, I would love the opportunity to learn!

    • @stayathomedev
      @stayathomedev  9 місяців тому +1

      YES! I've need to fix this but haven't included it. I will probably do a refactor/fix video at some point and can include it. Good catch!

  • @an4ximander
    @an4ximander Рік тому +7

    Please dont leave out weapon bob. There is no tutorial on You Tube that covers weapon bob.

    • @stayathomedev
      @stayathomedev  Рік тому +5

      Wouldn't dare...I'm going to cover as much as possible.

  • @hermest99
    @hermest99 6 місяців тому +1

    I added two other quality of life updates for debugging. A button to switch the mouse_mode from captured to visible and back and a label displaying the frames per second.
    Here's the code for the mouse switch (obviously you have to add another button to your button mapping):
    if event.is_action_pressed("switch_mouse_mode"):
    if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
    Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
    else:
    Input.mouse_mode = Input.MOUSE_MODE_CAPTURED

  • @the-nameless-dude
    @the-nameless-dude Рік тому +3

    Yes, I can finally make my dream game with this. Thankyou!

  • @Niksona-p1x
    @Niksona-p1x 5 місяців тому +10

    for some reason it says "Invalid access to property or key 'transform' on a base of type 'Nil'." can anybody help me out

    • @thegreatmightynerd
      @thegreatmightynerd 5 місяців тому +1

      same :(

    • @thegreatmightynerd
      @thegreatmightynerd 5 місяців тому +11

      I think i know what to do now, in 3d you go to characterbody3d and in the inspector you should see Camera controller somewhere at the top, click it and select your node you use as the neck

    • @Niksona-p1x
      @Niksona-p1x 5 місяців тому

      @@thegreatmightynerdOMG thanks bro

    • @temhirtleague-chess
      @temhirtleague-chess 3 місяці тому +4

      @thegreatmightynerd You are a true legend. This should be stated for anybody using 4.3+ versions.

    • @joshwimberly103
      @joshwimberly103 19 днів тому

      @@thegreatmightynerd on god total life saver been sitting for 30 mins trying to figure out why this wont work

  • @uktobar4336
    @uktobar4336 Рік тому +3

    This was and instant like and subscribe for me. Your explanations are beautiful, adds so much to the video; i only had to watch it once instead of 3-4 times. On top of open source for the whole tutorial project.

  • @jasonwilliams8730
    @jasonwilliams8730 Рік тому +2

    Thank you!

  • @Zoners0
    @Zoners0 Рік тому +4

    Non of this worked for me can you please do an updated version for the latest version of godot 4 I have tryed this almost 7 time every step and even tryed my own methods but non of them worked

  • @tanishandsaisf
    @tanishandsaisf 5 місяців тому +1

    you can use a csg3dbox instead of mesh for the floor

  • @chriswood426
    @chriswood426 Рік тому +1

    This an amazing course

  • @GemTappX
    @GemTappX 3 місяці тому

    My Guy! :)

  • @denny7477
    @denny7477 Рік тому +3

    Hey, as someone coming from unity, these tutorials are super valuable right now so thank you very much ! Also I would like to ask if you are going to implement stair stepping functionality ? I have problems with finding decent solution and a lot of people are saying "just use slope" which I dont really consider as good solution. I really dont want to setup a slope for every little bump on the map.. that would be very annoying to do. Its really surprising to me, that there is no standardized solution for this in Godot since Unity has that in their CharacterController by default for ages.

    • @stayathomedev
      @stayathomedev  Рік тому +4

      Thanks! And that's definitely something that will be looked at.

    • @skaruts
      @skaruts 6 місяців тому +1

      There's a neat solution for stair stepping in Godot that, in theory sounded preposterous to me for a long time,... until I noticed Thief uses it, and that in practice it actually never bothered me that much (only a tiny bit): the solution is using a SeparationRayShape3D (in a ShapeCast3D node) under an elevated capsule (Thief used two vertical spheres). The nice thing about it is that the ray shape will handle stairs naturally on its own and push the player up the steps, or make it stick down the steps. You may still want to interpolate the camera movement, though.
      The length of the separation ray defines the max height of climbable steps.
      The downsides of this method are kind of obvious, but may not matter at all depending on the game.
      - You will step down into tiny gaps. You don't get stuck, but if the floor has too many gaps it can be annoying (though the camera interpolation can reduce this).
      - falling off ledges requires falling off twice, once for the ray and another for the player shape. It kinda feels like you fall on your butt before actually falling off the ledge.
      - you will have trouble walking or landing on very small platforms, thin walls, and things of that nature.
      One of the upsides, is that that you don't have to correct your maps to remove collisions from wall baseboards and that sort of stuff, because with this method players can't step onto that kind of thing at all.
      I'm considering using this method for some horror games, that don't really require any ground precision, for example.

  • @oleksandr-petrovych
    @oleksandr-petrovych Рік тому +2

    COOL !!!

  • @sabrepilot
    @sabrepilot 9 місяців тому +1

    I had an issue with the clamp where it did not stop spinning on the x axis. The z axis was already being reset so the camera stayed upright but it would flip backwards if I looked up! watched the camera segment probably over 12 times so I'm confident I copied it right, but I eventually found that it WOULD clamp... but not after 90 degrees, but probably closer to 90 radians, meaning it would stop after a lot of spinning. Fixed it by clamping it by -2 and 2 instead.

  • @MyskitXD
    @MyskitXD 6 днів тому

    I can't believe it.
    A coding/Game Dev tutorial that my ADHD agrees with!?!?

  • @henryfleischer404
    @henryfleischer404 Рік тому +1

    Nice tutorial. I solved most of these before seeing it, but I didn't know about captured mouse or that reflection probe node. I should add that to my game. I'm working on a movement shooter, mostly inspired by DOOM. Currently I just got half-pipes working properly, but if I run into the intersection of a vertical wall and flat floor I loose all of my speed instantly. I think it has something to do with how I bodged together conservation of momentum working with slopes.
    Also, I spent ages figuring out how to get friction to vary depending on the player's angle relative to their movement angle, only to find in playtests that it's not particularly fun.

  • @isocondergibi
    @isocondergibi 10 місяців тому +7

    I'm following this tutorial to a tee and it keeps giving errors very cool

  • @bonsaipropaganda
    @bonsaipropaganda Рік тому

    wow this is going to be amazing!! I can't wait for this whole tutorial

  • @RhettTheDungeonMaster
    @RhettTheDungeonMaster Рік тому +2

    Dude! Can you show us how to map these controls to a controller? The right stick to rotate and look around, in particular? All the other buttons are simple and straightforward, but that camera is a little tricky. I learned the mouse controls on Zenva already but I'm stuck on controller mapping

    • @stayathomedev
      @stayathomedev  Рік тому +1

      We'll go over controller setup for sure. The goal is to get a really solid controller setup (moving, sprinting, jumping, animations) then add controller option.

  • @indiesslice
    @indiesslice 9 місяців тому +1

    I'm trying to follow along with this awesome tutorial but in C# and I'm running into a problem. If you could help that would be amazing.
    At 11:53 in line 46 you do:
    global_transform.basis = Basis.from_euler(_player_rotation)
    In C# that translates to:
    GlobalTransform.Basis = Basis.FromEuler(_playerRotation);
    However it says "Cannot modify the return value of 'Node3D.GlobalTransform' because it is not a variable."
    Would you have any idea about this?

  • @bigboibob2568
    @bigboibob2568 Місяць тому +1

    Just downloaded the project from github because for some reason the character won't move after following what you did and it still did not work. Inputs are correct and I have added the keybinds on both my project and the github project, I cannot see what could be going wrong

  • @Overlysalted
    @Overlysalted 9 днів тому

    One question... after we fix camera rotation so the player rotates with it, the scene always starts with player facing the negative Z axis. Rotating the player body doesn't solve it, and I've noticed it happens in your tutorial as well. I'm using Godot 4.3. How can this be fixed? Rotating the CharacterBody on the level messes up the controls because it rotates only the camera, not the whole body.

  • @Oltohm
    @Oltohm 10 місяців тому +2

    Putting _update_camera(delta) in the _physics_update() function causes my camera to be very jittery. I assume this is because the physics_update is capped to 60. Did you not have this issue too? @StayAtHomeDev?

  • @Th3_pigeon
    @Th3_pigeon Рік тому

    great tutorial : D

  • @elektrofox2746
    @elektrofox2746 Рік тому +3

    Something that I noticed about this particular implementation of mouse look, is that when you start the game the player is always looking in the same direction, regardless of which direction the player scene is facing in the level (IE, PlayerCharacter has been placed in the scene and was rotated 90 degrees). How exactly would this be fixed? It would be a very real problem for every player of a game (singleplayer OR multiplayer) to be looking Exactly North every time they load the game.

    • @doomerXII
      @doomerXII 4 місяці тому

      I fixed this (I think) by adding the following line to the _ready() function: _mouse_rotation = global_rotation

  • @itsdord
    @itsdord 10 місяців тому

    Very well explained! Only problem is that the script, copied and pasted straight from the repo, doesn't pick up any mouse movement. Printing rotation and tilt input leads to a sea of (0,0) vectors.
    EDIT: Figured it out, I had a ColorRect gobbling up the mouse input. Make sure its mouse behavior isn't set to Stop in the inspector.

  • @mr.willson5809
    @mr.willson5809 Рік тому +7

    Good edits and good vibes!
    And I really enjoyed it
    But I feel having the goal of making it simple by not over-explaining, It made me feel a lot of it was just "magic codes" that I just had to copy and paste and none of it has any meaning
    It makes me be scared of coding
    I wished you explained every line of code a lot more

    • @stayathomedev
      @stayathomedev  Рік тому +3

      It's a fine line. I think in future, more focused, videos that more time can be spent on code. Thanks for your comments!

  • @KillerGameDev
    @KillerGameDev Рік тому +2

    Im curious about the light probes. I dont have a ton of experience with light probes but in unity and unreal, I thought they were suppose to be static and it helped handle light data as the camera passed through them. Putting it on the camera sounds like potentially unneeded stress since the camera is needed for movement and the probes would be constantly moving and rotating. I wanted to ask about this since my major areas of noobness are light and shaders. Maybe godot functions differently when it comes to probes.

    • @MrxDaffy
      @MrxDaffy 10 місяців тому

      i am noob too but after reading documentation i thing you are correct.

  • @Arctic.Wolves
    @Arctic.Wolves 6 місяців тому

    Good luck to me, I'm start this course
    :P

  • @SoyBlandy
    @SoyBlandy 7 місяців тому

    Dios mio yo hablo español y asi entiendo a que te refieres en el tutorial en verdad este es el mejor curso explicas todo a detalle dios tengo un proyecto batleroyal en godot que estoy comenzando aser nesesitaba un tutirial como este muchisimas gracias bro en serio gracias

  • @CameronPenner
    @CameronPenner Рік тому +1

    Nice! This tutorial format is really good, looks super polished, and definitely feels inspired by Brackeys :) I hope this becomes a regular thing!
    I'm curious why you're multiplying the mouse input by delta? Shouldn't mouse movement be absolute? I think what you want is a much lower sensitivity instead (normal sensitivity numbers are based on degrees not radians, which is why the math looks different from other engines). If you use delta, then at low frame rates your sensitivity will go way up.

    • @stayathomedev
      @stayathomedev  Рік тому +4

      Something to be looked at in another video I think to have time to explain the issue.
      And thanks! Hoping the format works well. There was some inspiration :P

  • @UniqueInstrumentals
    @UniqueInstrumentals 8 місяців тому +2

    If anybody has a issue with running the code and you get error invalid get index 'transform' on base nil on the line CAMERA_CONTROLLER.transform.basis = Basis.from_euler(_camera_rotation).
    try moving ( litteraly click and drag the 3d camera) back onto your Character body 3D. Worked for me! Just forget the extra node he made you create at the start

  • @DaviSilveira
    @DaviSilveira 3 місяці тому

    Wonderful tutorial, thank you for taking the time to make this! One question, I'm not sure why but every time I move my mouse the whole scene flickers... I think it's the reflection node we added. It might be a Godot 4.3 version problem... any help?

  • @Kr33gola
    @Kr33gola 11 місяців тому

    this channel gives me brackets vibe at some point is gonna get abadoned

  • @CSBT001
    @CSBT001 8 місяців тому +3

    Yes it works🎉🎉
    But after 999999+ error 😂😂

  • @JohnnyThund3r
    @JohnnyThund3r 4 місяці тому

    This is just gonna become the default FPS template for most... Tutorials > Documentation at least for someone new like myself.

  • @GameChisel
    @GameChisel 10 місяців тому +3

    Yo this is a sick video so far but the func _unhandled_input(event) function on line 18 has multiple errors and says "expected expression after "==" operator" how do i fix it

    • @GameChisel
      @GameChisel 10 місяців тому

      Lol! Nevermind it was just a terribly stupid mistake!

    • @Xer0Tr0n
      @Xer0Tr0n 5 місяців тому +1

      @@GameChisel oh my gosh how did you get around this, it's driving me crazy, i copied it exactly

    • @GameChisel
      @GameChisel 5 місяців тому

      I'll try to find it but I don't remember lol XD

    • @GameChisel
      @GameChisel 5 місяців тому

      Tell me the time stamp​@@Xer0Tr0n

  • @АртурАмбаров-ы1ю

    Hi, very cool video, like definitely, there is a question whether the variables TILT_LOWER_LIMIT and TILT_UPPER_LIMIT can be set as a constant?

    • @AdemOmerovicBA
      @AdemOmerovicBA Рік тому +4

      If it's constant then it can't be changed once the game starts.
      Maybe you want all those values to be part of the game settings menu, then it's better to leave it as var and not as const.

    • @stayathomedev
      @stayathomedev  Рік тому +3

      You could if you really didn't want those to be adjusted...as the other commenter said...I think it becomes a customization issue and also not creating variable walls early on. May encounter a feature where the tilt needs to be narrowed or disabled for example.

  • @manderm
    @manderm Рік тому

    So, I've just discovered this channel through Thomas Brush, he out a post about your channel. Im thinking about coming to Godot. Will this cover setting up enemies as well as the player character? You may have already done this but i have juat started watching.

    • @stayathomedev
      @stayathomedev  Рік тому +1

      Hey! The plan is to cover as much as possible, so definitely enemies. We're about to add weapons very shortly.

  • @kccs5263
    @kccs5263 Рік тому +1

    For some reason when i use the reflection probe and hdri the reflection light flickers a lot. I dont know why this is happening so im just going to use the procedural sky.

    • @helloitshecker
      @helloitshecker 10 місяців тому

      yeah, it is happening to me too!

    • @helloitshecker
      @helloitshecker 10 місяців тому

      also, it is a bad practice as it lower's fps. instead make the reflection probe static to only the places where it is required detached from the player.

  • @christophercardeso8395
    @christophercardeso8395 6 місяців тому

    hi! love the series, one question - when I use the grid shader for multiple objects as the material, if I change the albedo color of one, it does it for all of them. How can I separate this? Thanks!

  • @UltraViolentYT
    @UltraViolentYT 9 місяців тому +1

    What are eulers and basis
    Been catching them a lot lately

  • @buzzmandev4017
    @buzzmandev4017 8 місяців тому +1

    Hi, would it be possible to get the project using compatability renderer instead of forward+?
    My laptop doesn't support Vulkan unfortunately so I can't edit the project.

  • @FengolZA
    @FengolZA 4 місяці тому

    How do I use/apply your custom prototype grid material to my own meshes? I get "something" working but the tiling is wrong

  • @Meneer-Animeren.company
    @Meneer-Animeren.company 3 місяці тому

    At 10:04 on my thing I couldn’t move the camera with my mouse

  • @RprtBak
    @RprtBak Рік тому +3

    Need this in C# :D

    • @stayathomedev
      @stayathomedev  Рік тому +2

      I'm contemplating it...it just would take me getting much more familiar with C#. But I think it's important to keep it in mind.

  • @Yoni123
    @Yoni123 Рік тому +1

    Will you do melee weapons and bows? I'm wondering if this would give me a good base for Kings Field like game. I'd have to figure out spells too... I'd guess lobbing a grenade would be quite similar to casting a spell?
    Why do you use _ in front of variables?

    • @stayathomedev
      @stayathomedev  Рік тому

      Yes! And how's Jimmy G doin?

    • @Yoni123
      @Yoni123 Рік тому

      @@stayathomedev Sounds great! I think he'd be doing a lot better with a decent oline... :D

    • @stayathomedev
      @stayathomedev  Рік тому +1

      He's not a mover...(I'm a niners fan)

    • @Yoni123
      @Yoni123 Рік тому

      That he is not, lol. You guys are looking great. And Purdy is my new favorite! @@stayathomedev

    • @stayathomedev
      @stayathomedev  Рік тому

      I love that man. He's Purdy good 👍

  • @UhhhhhStuff
    @UhhhhhStuff 3 місяці тому +1

    when i turn it on it just doesn't work here's my code
    extends CharacterBody3D
    const SPEED = 5.0
    const JUMP_VELOCITY = 4.5
    @export var tilt_lower_limit := deg_to_rad(-90.0)
    @export var tilt_upper_limit := deg_to_rad(-90.0)
    @export var camera_controller : Camera3D
    var mouse_input : bool = false
    var mouse_rotation : Vector3
    var rotation_input : float
    var tilt_input : float
    # Get the gravity from the project settings to be synced with RigidBody nodes.
    var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
    func _input(event):
    if event.is_action_pressed("exit"):
    get_tree().quit()
    func _update_camera(delta):
    mouse_rotation.x += tilt_input * delta
    mouse_rotation.x = clamp(mouse_rotation.x, tilt_lower_limit, tilt_upper_limit)
    mouse_rotation.y += rotation_input * delta

    camera_controller.transform.basis = Basis.from_euler(mouse_rotation)
    camera_controller.rotation.z = 0.0

    rotation_input = 0.0
    tilt_input = 0.0

    func _unhandled_input(event):
    mouse_input = event is InputEventMouseMotion and Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED
    if mouse_input:
    rotation_input = -event.relative.x
    tilt_input = -event.relative.y
    print(Vector2(rotation_input,tilt_input))
    func _ready():
    Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
    func _physics_process(delta):
    # Add the gravity.
    if not is_on_floor():
    velocity.y -= gravity * delta
    _update_camera(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 * 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()
    idk what it is please help me

    • @BigM11789
      @BigM11789 Місяць тому

      It may be too late now, but you need to call your camera node in your export variable. @onready var CAMERA_CONTROLLER : Camera3D = $CameraController/Camera3D #or whatever you named your camera nodes)

    • @UhhhhhStuff
      @UhhhhhStuff Місяць тому

      @@BigM11789 well i gave up on that

    • @BigM11789
      @BigM11789 Місяць тому

      @UhhhhhStuffI figured I’d throw it out there anyway. Hopefully it’ll help you in the future or someone else!

    • @UhhhhhStuff
      @UhhhhhStuff Місяць тому

      @@BigM11789 i started game dev on unity cuz of the lack of godot tutorials

  • @YmirTheGiant
    @YmirTheGiant 5 місяців тому

    im stuck on rotating the camera, my camera just isn't moving even when i have the code correct, what do i do?

  • @connorsullivan7648
    @connorsullivan7648 5 місяців тому

    I don't get why we set _rotation_input to relative x mouse movement and _tilt_input to relative y movement, but then in _update_camera(delta) we set _mouse_rotation.x to _tilt_input and _mouse_rotation.y to _rotation_input. Is this not the opposite of what it should be? I mean, it works, but why?

  • @aayanchowdhury
    @aayanchowdhury Рік тому

    Hey there! I am just getting into game-making, I'm wondering whether it's better to enroll in a programming course or dive into projects with the Godot game engine. What do you think is the way to go?

    • @stayathomedev
      @stayathomedev  Рік тому +1

      Honestly, go with whatever will keep you motivated. It's more about consistently working than the perfect path

  • @anthonyr453
    @anthonyr453 Рік тому

    Hi, I noticed a bug in the deceleration code. It appears that one axis can stop before the other. This can create an odd "sliding sideways" movement at certain angles as one axis will be completely stopped, but the other will still be decelerating. I don't have a fix for it, but just something I noticed in my own project.

  • @sennlich
    @sennlich Рік тому +1

    top top top

  • @N0TA8LE304
    @N0TA8LE304 Рік тому +2

    I have a problem with the _update_camera(delta) line in physics process function. i have an error code saying nvalid get index transform on base nill. i made sure everything was typed correctly. please help

    • @stayathomedev
      @stayathomedev  Рік тому

      Did you set the export variable in the inspector?

    • @N0TA8LE304
      @N0TA8LE304 Рік тому +2

      @@stayathomedev i figured it how! i had a breakpoint! rookie moves 😅 ty!

    • @N0TA8LE304
      @N0TA8LE304 11 місяців тому

      @@user-el8oj2sq9t i had a break line in the coded. im not sure under ur circumstances.

    • @olegrigs
      @olegrigs 11 місяців тому

      how can I do this?
      @@stayathomedev

  • @ahsanhafeez7631
    @ahsanhafeez7631 4 місяці тому

    I want to learn godot should i start with this Play list?

  • @aval0n452
    @aval0n452 5 місяців тому

    Hey loved the tutorial ! Just wanted to ask but am i the only one that has a weirdly low fps end result ? When trying with other tutorials it doesn't. It seems to happen during the camera script set up, if anyone knows if it's normal i'm taking it

  • @FriskDreemurr66669
    @FriskDreemurr66669 8 місяців тому +2

    i got this error
    Invalid get index 'transform' (on base: 'Nil').
    did anyone else and how can i fix it?

    • @FriskDreemurr66669
      @FriskDreemurr66669 8 місяців тому

      wait nvm, fixed it

    • @bryceowens-roberts8838
      @bryceowens-roberts8838 8 місяців тому

      @@FriskDreemurr66669 what did you do?

    • @FriskDreemurr66669
      @FriskDreemurr66669 8 місяців тому

      @@bryceowens-roberts8838 it's ok, i fixed it.

    • @coolik23
      @coolik23 7 місяців тому

      @@FriskDreemurr66669 How did you fix it?

    • @FriskDreemurr66669
      @FriskDreemurr66669 7 місяців тому

      @@coolik23 i think it was that i forgot to set an @export variable, i dont remember since this was a while ago