Тёмный

How to add dynamic weapon sway and recoil in Godot FPS  

JungaBoon
Подписаться 1 тыс.
Просмотров 20 тыс.
50% 1

We'll learn how to add weapon sway, movement bobbing, and recoil to your FPS projects in Godot 4.
View the code on Github: github.com/jungaboon/Tutorial...
USEFUL LINKS:
Tarodev - Sine Waves Visualized : • Sine Waves Visualized
Pefeper - Screen Shake in Godot : • Screen Shake (Godot 3D...
0:19 Creating basic FPS controller
3:38 Camera sway (left and right tilt)
4:40 Weapon tilt
5:03 Weapon sway
6:02 Weapon bobbing (walk movement)
7:20 Weapon recoil
9:55 Camera shake (Pefeper script)
10:25 Invert weapon sway direction (optional)

Игры

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

 

22 окт 2023

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 40   
@SlushyWizard
@SlushyWizard 7 месяцев назад
Holy moly, this was a fantastic video! Thanks for sharing your knowledge!
@ryannguyen7277
@ryannguyen7277 8 месяцев назад
love your tutorials man, thanks for uploading
@exomat7
@exomat7 4 месяца назад
best tutorial i've seen so far!
@bondo532
@bondo532 8 месяцев назад
exactly what i needed love you
@MrRPss
@MrRPss 8 месяцев назад
Thanks alot dude, found your video from the discord keep it up man this tutorials will blow up
@__Rizzler__
@__Rizzler__ 8 месяцев назад
thanks man. this is what ive been lookin for
@la.vibracion
@la.vibracion Месяц назад
great video! learned quite a bit from this one
@FireBender2010.
@FireBender2010. 8 месяцев назад
Yo this is great thanks for posting it in the discord so I could see it
@mikeg.5140
@mikeg.5140 7 месяцев назад
Great vid. Keep up the good work.
@appleamplifier4448
@appleamplifier4448 6 месяцев назад
Awesome video. Keep it up!
@Marandal
@Marandal 6 месяцев назад
This is epic. thanks Jun 🙂
@BurritoByte
@BurritoByte 7 месяцев назад
Hello JungaBoon! I wanted to thank you for this video. With it, I was able to reference and implement some of the cool features shown here in my FPS prototype (such as the weapon swaying). I just recently finished it and have published a video showcasing it on my page. I even put you in the game's credits page as a way to thank you. I'll be looking forward to future uploads from you! :^)
@user-oy4hk9yr3n
@user-oy4hk9yr3n 2 месяца назад
if you want just a little more juice on the weapon tilt you can add this to your weapon tilt function under the if statement weapon_holder.rotation.x = lerp(weapon_holder.rotation.x, input.y * weapon_rotation_amount, delta * 10) (you also need to add in a new variable at the top of the function called input_y and pass in your input_dir.y) This will make it so that moving back and forth causes the weapon to go up and down, down if forwards up if backwards
@alfredogodoy6854
@alfredogodoy6854 8 месяцев назад
THX!
@user-sc6og8ey6l
@user-sc6og8ey6l 3 месяца назад
VERY COOL!!!!!!!!!!!!! THANKS YOU ❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤
@anicepineapple9067
@anicepineapple9067 8 месяцев назад
Really impressive video. Definitely recommend time stamps.
@lethn2929
@lethn2929 22 дня назад
If anyone ends up wondering why their bobbing and swaying is completely wacky turn down the variables provided and you should get the results you want no problem.
@m24f8
@m24f8 6 месяцев назад
An absolute banger of a video. Instead of wasting everyone's time unlike a lot of folks on YT, you went straight to the point and gave sooooooo many good advices. Thank you kindly!
@meezi2987
@meezi2987 8 месяцев назад
this is cool
@sandman76_
@sandman76_ 7 месяцев назад
perfect
@yee2343
@yee2343 6 месяцев назад
Hey man, I appreciated the tutorial! One small issue I'm having is the mouse input part. It tells me that it isn't being declared in the current scope when I have it in the input function. I don't if its because Im mixing this with my code or something. I would appreciate your help! have a great day. Much love from Indy. edit: nevermind found it!
@TheJungaBoon
@TheJungaBoon 8 месяцев назад
Added a Github link for the scripts
@DriftWare
@DriftWare 4 месяца назад
I always seem to have an issue where the gun doesnt go back to it's pre-recoil position
@Dankakes
@Dankakes 3 месяца назад
i love you
@AjitoPicao
@AjitoPicao 5 месяцев назад
Very good tutorial, but my gun does not return after the recoil hahaha, can anyone help me?
@thev01d12
@thev01d12 4 месяца назад
Continuously lerp it to zero every frame
@LucasMuniz-sz8ep
@LucasMuniz-sz8ep 4 месяца назад
10:20 Hello, your videos are really good, but there is an error on line 9 that describes the following: 'Could not find type "CameraShake" in the current scope', and if I fix this, it tells me to change the Node3D to a single node in camera_shake node . Can you help me?
@WarMech366
@WarMech366 8 месяцев назад
What should I put in the Target of the weapon code?
@koditom
@koditom Месяц назад
I noticed my event.relative is based on the fps (lower the fps higher the event.relative). Any way to fix this?
@likestorml
@likestorml 5 месяцев назад
can you send a link to the sketchfab viewmodel?
@jlebrech
@jlebrech 7 месяцев назад
could you have the mouse controller the camholder y rotation instead and have the body react to that rotation? say if you have split upper body and lower body and just want to move the leg when the player moves too far.
@TheJungaBoon
@TheJungaBoon 7 месяцев назад
Sounds like it should work. Look into Dot Products to check if the player body's forward direction lines up with the current view forward direction. That's how I'd approach it off the top of my head, but I haven't tested that out yet.
@bIgKiNgLuEoffical
@bIgKiNgLuEoffical 7 месяцев назад
for some reason its been taking me days to figure out how to fix cannot call method sample on a null value?? and also the apply_recoil() thing is not working. HELP ME FIX THISSSSSSSSSSSS
@TheJungaBoon
@TheJungaBoon 7 месяцев назад
I'll need a bit more detail. Could you post your code on here and reshare? That way I can see how you're implementing the method sample paste.myst.rs/ One thing off the top of my head is that maybe you haven't set up a curve for the recoil?
@frogman1609
@frogman1609 3 месяца назад
I know it wasn't your tutorial, but I get an error when trying to add the camera shake effect. It's saying: " Invalid set index 'seed' (on base: 'Nil') with value of type 'int'. " any help would be awesome :)
@TheJungaBoon
@TheJungaBoon 3 месяца назад
I'm guessing it has something to do with this line on the CameraShake script? func get_noise_from_seed(_seed : int) -> float: noise.seed = _seed return noise.get_noise_1d(time * noise_speed)
@dynstinn
@dynstinn 7 месяцев назад
What about clipping into walls
@Gquain
@Gquain 7 месяцев назад
watch another tutorial on that
@darknetworld
@darknetworld 8 месяцев назад
Well it good but better to develop low polygon weapons and hands to be better visual how it work. Switch to simple to real feel off.
@danielweslley526
@danielweslley526 7 месяцев назад
What should I put in the Target of the weapon code?
Далее
I learned game development for 6 months...
11:42
Просмотров 41 тыс.
Multiplayer FPS Animations The Lazy (But Better?) Way
3:39
Active Ragdoll in Godot 4
3:21
Просмотров 1,7 тыс.
How to make FPS Animations in Blender 2.8+
13:10
Просмотров 590 тыс.
Why GODOT 4.3 is going to be wild!
9:50
Просмотров 119 тыс.
How To Make A Doom Clone In Godot 4
27:57
Просмотров 66 тыс.
#shorts ИГРАЮ В STANDOFF2 - Apollon🗿
4:27:26
Просмотров 162 тыс.