Тёмный

The DEFINITIVE FPS Tutorial for Godot 4.X (FULL COURSE) 

Chaff Games
Подписаться 7 тыс.
Просмотров 44 тыс.
50% 1

Follow Me on twitch: / chaff_games
This is the ultimate FPS tutorial for Godot 4. We will go from a simple FPS control to a Full FPS weapon manager.
If you're looking to make a game like Halo or Doom in Godot 4 then this is the tutorial series for you. We implement everything you need to have a fully function FPS controller in your game.
This is a compilation of all my tutorials so far combined into one. So you don't have to go hunt down the other videos.
Starting Point: github.com/chafmere/ultimate-...
Support the Channel: / chaffgames
Join The Discord: / discord
My Latest Course: www.udemy.com/course/building...
Get the FPS Template Here: chaffgames.com/fps-game-templ...
Download my RIG: chaffgames.com/wp-content/upl...
My Set Up:
VO Mic: amzn.to/3QfnL6d
Audio Interface: amzn.to/46MFidg
CloudLifter: amzn.to/49dMUqE
Camera Mic: amzn.to/4980cFh
Case: amzn.to/46JiTxi
CPU: amzn.to/471Jeah
GPU: amzn.to/3si8r0G
Keyboard: amzn.to/3tPL6nC
Mouse: amzn.to/46KhM0h
As an Amazon Associate I earn from qualifying purchases.
---------------------------------------------------------------------------------------------
Bookmarks
Intro 0:00
FPS camera and movement 1:18
Weapon set up 13:11
Shoot and reload 34:23
Hitscan weapons 48:08
Projectile weapons 1:04:03
Hitscan physics 1:22:53
Pick up weapons 1:33:06
Drop weapons 1:44:42
Pick up ammo 1:59:37
Melee 2:09:36
Add a rig 2:28:14
Conclusion 2:40:59
----------------------------------------------------------------------------------------------
Please like and Subscribe! It's truly appreciated
#GameDevelopment #GameJam #Godot
Links to my Socials
Instagram: / chaff.dev
Twitter: / chaffdev
Itch.io: chafmere.itch.io/
Website: chaffgames.com

Опубликовано:

 

1 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 165   
@Chaff_Games
@Chaff_Games 10 месяцев назад
This is a compilation of all my tutorials so far combined into one. So you don't have to go hunt down the other videos.
@meezi2987
@meezi2987 10 месяцев назад
Ok I understand thank you👍
@notimportant3033
@notimportant3033 10 месяцев назад
Can you add chapters to this video if we want to scroll to a specific one?
@Chaff_Games
@Chaff_Games 10 месяцев назад
@@notimportant3033 yes I should have done that sorry. Will do as soon as I get home.
@notimportant3033
@notimportant3033 10 месяцев назад
@@Chaff_Games It’s okay man, thanks
@Luckypoe
@Luckypoe 9 месяцев назад
👍
@ahmed_mo2nis_productions
@ahmed_mo2nis_productions 10 месяцев назад
I have been following your tutorials for some time. Thank you for everything
@Luckypoe
@Luckypoe 9 месяцев назад
Thank you so much for your work, Know that you helped your example a lot because you gave a general picture of how to do it! Your channel deserves a lot more subscribers and views!
@shabbyowo
@shabbyowo 6 месяцев назад
Wow, I didn't know there was a compiled version of the videos. I'm so glad I found it! TY :)
@limax2107
@limax2107 9 месяцев назад
you are a life saver, this channel deserves more suscribers.
@genericjames7949
@genericjames7949 7 месяцев назад
I love this because its not super beginner but does a very good job of showing what to do and why.
@realjames1
@realjames1 10 месяцев назад
truly a giga chad, well done chaff
@Snapper-gaming
@Snapper-gaming 5 месяцев назад
For everyones sake, I think you should add this to the description of the video, or edit your pinned comment and add this: Add a tag of which type your variables is, it really help soooo much when coding in godot. For example. var Current_Weapon : Weapon_Resource = null By adding : Weapon_Resource, godot will now show you auto completion everytime you refer to this variable. :)
@Chaff_Games
@Chaff_Games 5 месяцев назад
Oh yeah how good is typing now. Back when I made this it was still done a lot less. 3.5 days barely anyone did. And now I would consider it mandatory, it gives you a lot of extra help.
@RS-HAIR
@RS-HAIR 8 месяцев назад
Thank you for share ❤
@FarSam25
@FarSam25 9 месяцев назад
Thank you so much
@D.E.Nicolas.Goncalves
@D.E.Nicolas.Goncalves 9 месяцев назад
a lot of insight while watching, Thanks for the gold!
@meezi2987
@meezi2987 10 месяцев назад
Very good idea🤩🤩 this is a conglomeration of individual episodes or no???
@cmds.learning7426
@cmds.learning7426 10 месяцев назад
AMAZING
@Encpc
@Encpc 5 месяцев назад
Thanks bro
@savorsauce
@savorsauce 2 месяца назад
Something I would like to see added to this video is for the weapon pick up section. In the video the script takes a selection of variables that you have to hardcode in for each spawnable item. I would recommend changing this to accept the resources directly, as it prevents potential user error. The change is as simple as replacing the @export variable declarations with @export weapon: Resource. Then you can access each variable with weapon.ammo or weapon.weapon_name. Hope this helps!
@Pootisbird69
@Pootisbird69 9 месяцев назад
17:54 yeah obviously. SPIN FOR THE WIN!!!
@Chaff_Games
@Chaff_Games 9 месяцев назад
🤣
@DaShizi
@DaShizi 4 месяца назад
Good vid
@ItsLars2828
@ItsLars2828 7 месяцев назад
Amazing video, a few thoughts: - how could I go about starting or switching to unarmed? - how I could implement picking other things up (swords) and using them
@Chaff_Games
@Chaff_Games 7 месяцев назад
Same as anything. For un armed you can create a resource for it. Obviously, it can’t be dropped 😂. Swords and melee weapons would be the same however, you might need to customise the shoot function to support a third way of detecting a hit. I do my melee strike with a simple 1 meter ray cast. Which would not be sufficient for a game based on melee weapons like swords. I would look into using an area3d to detect the space in front of you. Or more advanced continuous ray cast along the weapon to detect a strike
@artiop7687
@artiop7687 9 месяцев назад
THANKS a very good and complete tutorial very well explained don't copy paste you learn how to do
@MECHA-TED
@MECHA-TED 2 месяца назад
would you be able to do a tutorial on Red Orchestra style freeaim deadzone (where the gun moves separate from your camera) ?
@dootydut
@dootydut 5 месяцев назад
25:31 - Saving my spot for later.
@Fearlez_11
@Fearlez_11 9 месяцев назад
"if it's working, it's working..even though the code is messed up" :P
@Adam-gk4pv
@Adam-gk4pv Месяц назад
Not sure if you ever cover it in another video, but how would you go about adding a bullet hole decal system to replace the hit markers? I've seen other people use a ray cast as a child of the camera node, and from there they get the collision normal and rotate the decal accordingly. The ray you created in this system detects intersections using code so it's a bit different, but would bullet hole decals it still be possible?
@Chaff_Games
@Chaff_Games Месяц назад
The information from the second ray cast should be enough to do such a thing, it carries the exact same information. I create a very basic hit decal in this video. However I believe the way I do it may be a bit outdated. There is a decal node that I have not yet played around with that may be more useful for displaying a bullet hole.
@javi1988
@javi1988 8 месяцев назад
Excelent tutorial. Coukd you do the same but for 2d?. Thanks
@Chaff_Games
@Chaff_Games 8 месяцев назад
Hey, thanks ☺️. I don’t really do too much 2d these days but miziziziz put out a tutorial recently ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-UYQfVx1EIW8.htmlsi=mVwYoZ8fhFeM8fRa
@leerpret3950
@leerpret3950 8 месяцев назад
* print with `print("Health is: ", health)` (instead of concatenating with +), then you dont have to do string(health)
@Chaff_Games
@Chaff_Games 8 месяцев назад
That’s interesting. Thanks for pointing out.
@Fuckbro100
@Fuckbro100 7 месяцев назад
Im so gonna watch this... just later
@Chaff_Games
@Chaff_Games 7 месяцев назад
There’s individual episodes if you want to pick through them individually. I have a playlist on my channel
@ElGhost-p6t
@ElGhost-p6t 7 месяцев назад
28:24 Hi, I was typing your code when out of nowhere on line 29 the message 'Invalid get index '0' (on base 'Array)' appears, what should I do?
@Chaff_Games
@Chaff_Games 7 месяцев назад
Hey, what do you have on line 29? An invalid get index normally means whatever you’re requesting is non existent. Jump in the discord if you want to post screenshots and we can get you up and running
@Yoni123
@Yoni123 9 месяцев назад
Will you do enemies next?
@Chaff_Games
@Chaff_Games 9 месяцев назад
Maybe.
@thegrayson
@thegrayson 3 месяца назад
I'm at the hitscan portion of the tutorial and am getting a weird issue (godot 4.2.1). Despite weapon range set to 2,000, I only get hit detection within like 3 meters. However, at ten meters away, I only get hit detection if I move my mouse over the target, but I only get one hit detection before I have to move my mouse again to get another. And If I WASD maneuver my reticle over the box, I dont get any more hits until I move my mouse. My code seems identical, but I'm prone to overlooking things. I'll continue with the tutorial and maybe you'll address it at some point or I figure it out. I'll update this comment.
@Chaff_Games
@Chaff_Games 3 месяца назад
That’s the first I’ve heard of that. Jump on the discord and we can try and figure it out
@thegrayson
@thegrayson 2 месяца назад
@@Chaff_Games I went on vacation and didn't get to reach out, but I just figured it out though!! I had both the camera height and player capsule height at the same height. This lead to it sometimes thinking was colliding with my own head. TLDR Make sure the camera is INSIDE the player collision shape like you had it or you get very weird ray casting behavior. Cant wait to continue with the tutorial now lol
@klaatubarada6200
@klaatubarada6200 5 месяцев назад
Hello Chaff! My hitscan and projectiles weapons are not shooting to the center of the screen, they go straight from weapon position. What am I doing wrong? Thanks
@Chaff_Games
@Chaff_Games 5 месяцев назад
The first thing that comes to mind is the direction math that is done at the start of the projectile function. But if hitscan is doing that as well, I’m not too sure. First time I’ve heard that. Are you using a custom resolution for retro games?
@savorsauce
@savorsauce 2 месяца назад
I didn't see you show or answer this question, what are the layer and mask for the characterbody? I think that my bullet projectile is somehow colliding with my player, and I don't want that to happen.
@savorsauce
@savorsauce 2 месяца назад
For anyone interested I set the layer to player, and the mask to world and player and it worked.
@Chaff_Games
@Chaff_Games 2 месяца назад
Good point. I talk about the layer concerns for projectiles at 1:12:46. I provide very general advice on the problem, however, I do not say what layer the player is on. You're solutions below is how it is set up.
@subhi7956
@subhi7956 2 месяца назад
i really need help at 40:20 the game keep crashing , says breakpoint at function ready, i don't know what is wrong, i did everything just like you but... also i deleted everything from the hud script to signals and disconnected them and did everything again and still crashing i have godot 4.2
@Chaff_Games
@Chaff_Games 2 месяца назад
Maybe try removing the break point? Look for a red dot on the side of your script then click it.
@gugerruder9867
@gugerruder9867 Месяц назад
I have a problem that the scene is restarted, but the value in the weapon, for example, the current ammo or reserve ammo are not returned
@Chaff_Games
@Chaff_Games Месяц назад
That's not covered in this video. You could do it with a singleton.
@sega2333
@sega2333 6 месяцев назад
great video and lesson thanks, but I have an interesting problem. I noticed that bullets (projectiles of a weapon firing projectiles) They repeat some of the character 's Input when they lie on the ground after a shot , like jumping and walking . I have no idea why at all.
@Chaff_Games
@Chaff_Games 6 месяцев назад
Hey there, the reason for this is that the rigid body projectile needs to be set as top level. If you don’t do this then the projectile will follow the transform of the player.
@sega2333
@sega2333 6 месяцев назад
@@Chaff_Games excuse me I'm a beginner for that , but where is top level the bullet in our separate scene, or are you talking about something else
@Chaff_Games
@Chaff_Games 6 месяцев назад
check at 1:11:50
@sega2333
@sega2333 6 месяцев назад
@@Chaff_Games Damn, I missed it. Yes, everything worked fine, thank you very much
@sugoidxth
@sugoidxth 6 месяцев назад
I don't expect you to reply, and I do apologise if the answer is in the video - but I'm just asking ahead because I won't be doing this anytime soon so I'm just asking incase you can answer. Does the FPS system work with other camera/movement systems or is it somehow crucially tied to the one you made in this video?
@Chaff_Games
@Chaff_Games 6 месяцев назад
In this tutorial I don’t touch the camera except to move it with the mouse. So if you wanted to have some other set up it will be fine.
@sugoidxth
@sugoidxth 6 месяцев назад
@@Chaff_Games Thank you very much for the reply! Alright, thanks!
@MonkeyWrench28
@MonkeyWrench28 6 месяцев назад
I get the error "Invalid index type "String for a base of type "Array"." for the Change_Weapon function: func Change_Weapon(weapon_name: String): Current_Weapon = Weapon_Inventory[weapon_name]
@Chaff_Games
@Chaff_Games 6 месяцев назад
Hey, Check the declaration of the Weapon_Inventory, it should be declared as a Dictionary. Not an Array.
@MonkeyWrench28
@MonkeyWrench28 6 месяцев назад
@@Chaff_Games that works now, thanks!
@s3nju279
@s3nju279 9 месяцев назад
does the gun recieve shadows or are you moving it out of the way when you walk too close to walls?
@Chaff_Games
@Chaff_Games 9 месяцев назад
In this series i don’t implement any view model clipping solutions. The models should receive all lighting information including shadows.
@s3nju279
@s3nju279 9 месяцев назад
i apologize i see you have a video on how to get camera to show but also receive light. gonna give that a watch here in a bit. this is a good set up.@@Chaff_Games
@Chaff_Games
@Chaff_Games 9 месяцев назад
@s3nju279 I’m making an update as well. I think in godot 4 the subviewport does not show shadows.
@Jeepers.Kreepers
@Jeepers.Kreepers Месяц назад
im done with camera and movement, but whenever i run it, it says not responding. anything i can do to fix this?
@Chaff_Games
@Chaff_Games Месяц назад
Haven’t seen that before, are you getting any feedback from the engine as to why
@gli7ch240
@gli7ch240 4 месяца назад
Hey im javing trouple importing your zip file to a new project of mine. I recently doscovered your project file template online and relized it is perfect for what i want. I download it and go into godot then i import the zip file as a new peoject all the files load on but the project doesnt load it says missing dependency of character controller. Plz help.
@Chaff_Games
@Chaff_Games 4 месяца назад
Are you trying to load on an android device? It’s the only place I’ve encountered that error. Which seemed to go away when I closed and re opened.
@gli7ch240
@gli7ch240 4 месяца назад
@@Chaff_Games yes I actually am making a mobile fps zombies on my phone using godot mobile and it worked when I loaded again 🤣 I can't believe I didn't just try again I'm dumb thanks for the feedback you earned a sub.
@Chaff_Games
@Chaff_Games 4 месяца назад
Thanks, no problem. Best of luck.
@yee2343
@yee2343 7 месяцев назад
hey chaff! this is a really helpful tutorial, but I'm having one issue. for the hud code, I followed what you had coded closely but a issue has arisen. The Ammo label has a breakpoint. I do not know what it is, or why it isn't showing the ammo. If you need me to, I can post the code its self and maybe you can help fix the issue. I know being a dev and a youtube can be quite busy and I understand if you cannot reply to this comment immediately or at all. Anyways, hope you had a wonderful holiday.
@Chaff_Games
@Chaff_Games 7 месяцев назад
Hey, happy to help. Jump on the discord and send me a message.
@yee2343
@yee2343 7 месяцев назад
@@Chaff_Games will do, is there a channel you want me to send it in? or would you want a direct message?
@Chaff_Games
@Chaff_Games 7 месяцев назад
@yee2343 I just made a channel called tutorial help
@yee2343
@yee2343 7 месяцев назад
@@Chaff_Games alrighty thank you!
@Yoni123
@Yoni123 9 месяцев назад
How did you make the map)
@Chaff_Games
@Chaff_Games 9 месяцев назад
It’s just a grid map with assets from www.kenney.nl/assets
@kiryD
@kiryD 9 месяцев назад
HitScan hits itself what do i have to do
@kiryD
@kiryD 9 месяцев назад
got it. my wrong project_local_ray_normal >> project_ray_normal Thanks for ultimate guide
@trashmosh
@trashmosh 4 месяца назад
how would you add full body models for multiplayer?
@Chaff_Games
@Chaff_Games 4 месяца назад
You would need a few things. For the other players you would need an animated rig and a way to sync the animations across the server. I’ve never done that before.
@trashmosh
@trashmosh 4 месяца назад
@@Chaff_Games would full body be on another and how would you code the animation
@trashmosh
@trashmosh 4 месяца назад
layer*
@Chaff_Games
@Chaff_Games 4 месяца назад
@trashmosh sorry not sure. I have not explored that yet.
@meeeaCH9612
@meeeaCH9612 9 месяцев назад
Guys if you add this line to the end of the pick up detection: if body.pick_Up_Type == "Ammo" && weapon_Stack.find(body.weapon_Name,0) != -1: body.queue_free() then it will remove the clip, after the pick up and you won't pick up the clip, if you don't have the gun for it.
@Maxschellenberg
@Maxschellenberg 6 месяцев назад
I am using godot 4.2 and no script templates showed up when I followed your instructions from the start. Any clue what I can do?
@Maxschellenberg
@Maxschellenberg 6 месяцев назад
I had to rename the character3d node first.
@Chaff_Games
@Chaff_Games 6 месяцев назад
Hmmm, that’s not something I’ve had to deal with before. Is there an editor setting maybe?
@kimo1582
@kimo1582 6 месяцев назад
Thank you sir, same issue for me.@@Maxschellenberg
@user-zb2yt3fw5k
@user-zb2yt3fw5k 6 месяцев назад
At around 39:24 I got a problem. When using the signal I get this error after launching the game: Invalid call. Nonexistent function 'set_text' in base 'Nil'. Any ideas?
@daniloffszz
@daniloffszz 6 месяцев назад
xd, too do you found solution? upd: I found core of error. signal is works faster than @onready -> variable is null upd2: I moved declaring variables in to the functions. its work correctly. but i dont think is good solution. reply me if you find better solution.
@user-zb2yt3fw5k
@user-zb2yt3fw5k 6 месяцев назад
No I found nothing @@daniloffszz
@user-zb2yt3fw5k
@user-zb2yt3fw5k 6 месяцев назад
how did you fix it @@daniloffszz
@Chaff_Games
@Chaff_Games 6 месяцев назад
Hey, the easiest way to fix this is to make sure that your canvas layer is above the weapon manager. The scene is created top to bottom when the game starts so if it's above the weapon manager then it will exist when the signal is emited. You could always put a time delay on the first emission as well.
@user-zb2yt3fw5k
@user-zb2yt3fw5k 6 месяцев назад
@@Chaff_Games I fixed it by declaring the variable in the CanvasLayer Script. Thanks though!
@ItsLars2828
@ItsLars2828 7 месяцев назад
Hi There, what is the license for the code / tutorial etc? Just before I start! Thanks
@ItsLars2828
@ItsLars2828 7 месяцев назад
And also wondering about the assets / project file. What the license is for that / if we can use it (credit). Thanks :)
@Chaff_Games
@Chaff_Games 7 месяцев назад
MIT
@Chaff_Games
@Chaff_Games 7 месяцев назад
If you download the file, I use kenney.nl assets, which are all CC0. The code is all MIT. So nothing in the project requires credit.
@ItsLars2828
@ItsLars2828 7 месяцев назад
@@Chaff_Games great and how can I credit to the MIT lisence?
@Chaff_Games
@Chaff_Games 7 месяцев назад
@@ItsLars2828 You don't need to.
@AeolisticFury
@AeolisticFury 8 месяцев назад
Help, I followed everything in the tutorial but for some reason I always hit the player CharacterBody3D as the first and only collider. So the Hitscan and projectiles dont work...
@Chaff_Games
@Chaff_Games 8 месяцев назад
Hey, Thanks for your patients. I tried to re create this issue but I was only able to hit the player collision if I move the collision shape in front of the player. Nevertheless, you can add the code New_Intersection.set_collision_mask(0b11111101) to exclude the player. Assuming the player is on the second layer. Add this right below where you create the physics ray query parametre. Thanks.
@tmilker
@tmilker 7 месяцев назад
@@Chaff_Games I ran into this issue too with Godot 4.2. I don't know if this person is doing the same thing but I had switched to the Jolt Physics engine(going to be the default in the future). Something is different and causes the raycasts to hit the player even though my bullet point is clearly forward of the player's collision shape. Once I changed it back to the default physics, it worked fine. I'll do some more debugging and see if I can figure out what it is.
@tmilker
@tmilker 7 месяцев назад
I think it's that Jolt raycasts are more accurate than the built-in physics engine. When the player looks down below level with the horizon, the bullet point gets rotated inside the player's collision shape. Jolt apparently detects collisions that begin within a collision shape and exit them as a collision, where the built-in engine does not. That's my current guess at least. I think the correct solution is to use a mask like you suggested.
@swordofglass
@swordofglass 6 месяцев назад
@@tmilker I actually figured out what this is. Jolt 0.10 and under, you have to set new_intersection.hit_back_faces = false - they fixed this in the latest version of the engine in 0.11 so you should probably just update
@tmilker
@tmilker 6 месяцев назад
@@swordofglassThanks, that certainly explains things! It appears Jolt version doesn't matter because I just checked and by default hit_back_faces is still set to true. (I was already using 0.11)
@rankerhowl9910
@rankerhowl9910 9 месяцев назад
How do I find out how you made the initial world
@Chaff_Games
@Chaff_Games 9 месяцев назад
It’s just a grid mesh. I don’t have a video on, sorry .
@vcd200044
@vcd200044 8 месяцев назад
@@Chaff_Games Cool. Could you provide the starting project that only has the initial world? I want to follow your tutorial step by step.
@Chaff_Games
@Chaff_Games 8 месяцев назад
@vcd200044 I’ll look at uploading in the next day.
@Chaff_Games
@Chaff_Games 8 месяцев назад
@@vcd200044 github.com/chafmere/ultimate-FPS-Tutorial-Godot-4
@vcd200044
@vcd200044 8 месяцев назад
@@Chaff_Games Thanks for your update!😆
@SamuTheFrog
@SamuTheFrog 2 месяца назад
MOUSE SENSISITIVY
@exploringbiblicalendtimes779
@exploringbiblicalendtimes779 9 месяцев назад
I did all the things for camera and keep getting errors for some reason even though I copied you. I have tried so many tutorials for camera mouse and can never get it for some reason.
@Chaff_Games
@Chaff_Games 9 месяцев назад
What kind of error are you getting?
@exploringbiblicalendtimes779
@exploringbiblicalendtimes779 9 месяцев назад
@@Chaff_Games Dosent matter now cause I deleted it. It would just say things like it wasn't declared or something like that on certain lines
@Chaff_Games
@Chaff_Games 9 месяцев назад
@@exploringbiblicalendtimes779 well if you need more help, jump in the discord and we can walk through it.
@phoeniciandiaspora4584
@phoeniciandiaspora4584 7 месяцев назад
48:04
@b0gie
@b0gie 7 месяцев назад
@slavnight242
@slavnight242 9 месяцев назад
At 9:33 i get an error in line 23 and 30. I did exactly what you did
@Chaff_Games
@Chaff_Games 9 месяцев назад
What’s the error?
@slavnight242
@slavnight242 9 месяцев назад
@@Chaff_Games But i have MainCamera as a child node of CharacterBody3D: 0 - res://scripts/player_controls.gd:30 - at function: CameraLook 1 - res://scripts/player_controls.gd:23 - at function: _input player_controls.gd:3 @ _ready(): Node not found: "$MainCamera" (relative to "/root/world/CharacterBody3D").
@aleccarpenter439
@aleccarpenter439 7 месяцев назад
I'm actually having a similar problem with this lol. It's saying Node not found: "%MainCamera" (relative to the Character Body @@Chaff_Games
@Chaff_Games
@Chaff_Games 7 месяцев назад
Try taking out the %. Or just re initialise the camera node variable for your particular project. I used an old method or alternative method that can be confusing for new comers.
@aleccarpenter439
@aleccarpenter439 7 месяцев назад
Yeah. Removing the % sign did it and I was able to troubleshoot it. I'm learning a ton and thank you so much@@Chaff_Games
@skiffenderson3942
@skiffenderson3942 8 месяцев назад
Player fall through the floor. Why?
@Chaff_Games
@Chaff_Games 8 месяцев назад
Check your collision layers
@RprtBak
@RprtBak 9 месяцев назад
Wish someone did this for C# lol I have the worst time using C# in Godot, I just can't fucking figure out half the shit. I might have to stick with Unity or Unreal :| but I don't want to
@Chaff_Games
@Chaff_Games 9 месяцев назад
Nothing wrong with gdscript. But i Guess it depends on what you’re making.
@revenant131
@revenant131 8 месяцев назад
im struggling getting it to boot after adding the weapon manager. I am getting a breakpoint error. I think I Have everything setup correctly. my animations are in a library so it would be p90/activate. Breakpoints are at line 20 so "Initialise(Start_Weapons)" and another at "Current_weapon = Weapon_list[Weapon_Stack[0]]"
@revenant131
@revenant131 8 месяцев назад
I added p90 as a starting weapon but still am getting the breakpoint errors.
@Chaff_Games
@Chaff_Games 8 месяцев назад
Hey there, what are the break points?
@revenant131
@revenant131 7 месяцев назад
@@Chaff_Games here is an imgr link if thats ok. i.imgur.com/3hhv619.png
@revenant131
@revenant131 7 месяцев назад
im an idiot. I didnt realise what Breakpoints where. I will try again now@@Chaff_Games
@revenant131
@revenant131 7 месяцев назад
ok, I am getting "Invalid get index 'p90' (on base: 'Dictionary').
@Hey-ur7bl
@Hey-ur7bl 5 месяцев назад
hitscan is no working
@Chaff_Games
@Chaff_Games 5 месяцев назад
Works fine for me 😂. Jump on the discord if you need some help finding where you’ve went wrong.
@Txlr_Nz
@Txlr_Nz 8 месяцев назад
why not use deg _to_rad ( )
@Chaff_Games
@Chaff_Games 8 месяцев назад
Thanks for the feedback. Could you please tell me at which point in the video you’re asking about?
@alexmcgreal836
@alexmcgreal836 4 месяца назад
@@Chaff_GamesBit late to the party but they are probably referring to the rotation of the camera controls. They way you've done it works fine, but by converting the degrees to radians you can use smaller numbers for neatness, it's how I've seen other people approach camera controls in other tutorials.
@Aquafalcon
@Aquafalcon 9 месяцев назад
Pls help. This is my weapon manager script var current_weapon = null var weapon_stack = [] # An array of weapons currently held by the Player var weapon_indicator = 0 var next_weapon: String var weapon_list = {} @export var weapon_resources: Array[Weapon_Resource] @export var start_weapons: Array[String] func _ready(): !Initialize(start_weapons) # Enter the state machine func Initialize(_start_weapons: Array): # Creating a dictionary to refer to our weapons for weapon in weapon_resources: weapon_list[weapon.weapon_name] = weapon for i in _start_weapons: weapon_stack.push_back(i) # Add out start weapons !current_weapon = weapon_list[weapon_stack[0]] # Set the first weapon in the stack to current enter() func enter(): # Call when first "entering" into a weapon animation_player.queue(current_weapon.Active_Anim) func exit(): # In order to change weapons first call exit pass Whenever I try to run the game I get the error Invalid get index ‘blasterB’ (on base: ‘Dictionary’). My errors are on the lines that start with ! 28:58
@Chaff_Games
@Chaff_Games 9 месяцев назад
An invalid get index on a dictionary usually means that the variable you’re trying to get from the dictionary, isn’t there. So following the code, we know that there’s either a problem with the weapon lists creation, or there’s a mismatch of variables in either the weapon name or the starting weapons variables (which we are using to reference our dictionary). Check both of those and let me know how you go.
@Aquafalcon
@Aquafalcon 9 месяцев назад
Changing the variable gives me a different error Invalid get index ‘Active_Anim’ (on base: ‘Resource (Weapon_Resource)’) Although deleting the line to queue the Active_Anim gets rid of the errors
@Chaff_Games
@Chaff_Games 9 месяцев назад
Does that variable exist in the weapon resource? I named it Activate_Anim. Renaming is obviously fine but make sure they match otherwise this error will present itself.
@Aquafalcon
@Aquafalcon 9 месяцев назад
Thank you so much! I wrote active_Anim instead of activate_Anim Definitely subbing ❤️❤️❤️
@user-rl3vu2yn4z
@user-rl3vu2yn4z 7 месяцев назад
porque cuando roto la camara me da error en transform.basis = Basis() MainCamera.transform.basis = Basis()
@Chaff_Games
@Chaff_Games 7 месяцев назад
What is the error?
@daxtonzimmerman3091
@daxtonzimmerman3091 10 месяцев назад
HELP!! PLEASE 24:46 I typed and did exactly what it said but it gives me an error extends Node3D @onready var Animation_Player = get_node("FPS_Rig/AnimationPlayer") var Current_Weapon = null var Weapon_Stack = [] var Weapon_Indicator = 0 var Next_Weapon: String var Weapon_List = {} @export var _weapon_resources: Array[Weapon_Resource]
@Chaff_Games
@Chaff_Games 10 месяцев назад
I just want to confirm you’re using godot 4? Because I’m pretty sure this error was present in other versions? Other than that double check the weapon resource and make sure name is the same and that it is a resource. And if all that is correct then, it should work, even the error message agrees with us (we are exporting a resource).
@daxtonzimmerman3091
@daxtonzimmerman3091 9 месяцев назад
I just switched to 4.1 from 4.0 and it seemed to fix the problem. Thank you!@@Chaff_Games
@Chaff_Games
@Chaff_Games 9 месяцев назад
hmmm perhaps this bug existed in Godot 4? I know it's a new feature but i thought 4 and up. perhaps i need to update the description. I'm glad it's working for you now.
@tiozloko1599
@tiozloko1599 29 дней назад
func _input(event: InputEvent) -> void: if Input.is_action_pressed("ui_cancel") : Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) if event is InputEventMouseMotion: rotation.y -= event.relative.x #horizontal rotation.x -= event.relative.y #vertical "Camera".rotation.x -= event.relative.y if event is InputEventMouseMotion: rotation.y -= deg_to_rad(event.relative.x * sensitivity) main_camera.rotation.x -= deg_to_rad(event.relative.y * sensitivity) #script full extends CharacterBody3D @onready var main_camera: Camera3D = get_node("main_camera") const SPEED = 5.0 const JUMP_VELOCITY = 4.5 var camera_rotation = Vector2(0,0) var sensitivity = 0.1 func _ready() -> void: Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) func _input(event: InputEvent) -> void: if Input.is_action_pressed("ui_cancel"): Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) if event is InputEventMouseMotion: rotation.y -= deg_to_rad(event.relative.x * sensitivity) main_camera.rotation.x -= deg_to_rad(event.relative.y * sensitivity) main_camera.rotation.x = clamp(main_camera.rotation.x, -1.2, 1.2) #main_camera.rotation.x = clamp(main_camera.rotation.x, deg_to_rad(-90),deg_to_rad(90) func _physics_process(delta: float) -> void: # Add the gravity. if not is_on_floor(): velocity += get_gravity() * delta # Handle jump. if Input.is_action_just_pressed("ui_accept") 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("ui_left", "ui_right", "ui_up", "ui_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()
Далее
Optimizing my Game so it Runs on a Potato
19:02
Просмотров 512 тыс.
10+2 AWESOME ADDONS for GODOT 4
8:36
Просмотров 134 тыс.
Ютуб был хороший...
00:52
Просмотров 246 тыс.
▼КОРОЛЬ СОЖРАЛ ВСЕХ 👑🍗
29:48
Просмотров 464 тыс.
4 Godot 4 Devs Make 4 Games in 44 Hours
25:19
Просмотров 498 тыс.
Multiplayer FPS Animations The Lazy (But Better?) Way
3:39
Immersive Sim in Godot 4: COGITO - Overview
8:22
Просмотров 37 тыс.
10 Minutes vs. 10 Years of Animation
19:29
Просмотров 755 тыс.
These awesome 3D games are made in Godot
5:40
Просмотров 104 тыс.
A new way to generate worlds (stitched WFC)
10:51
Просмотров 520 тыс.
I Made the Same Game in 8 Engines
12:34
Просмотров 4 млн
The biggest lie in video games
15:18
Просмотров 1,7 млн
How do non-euclidean games work? | Bitwise
14:19
Просмотров 2,4 млн
Ютуб был хороший...
00:52
Просмотров 246 тыс.