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
if anyone is having trouble clamping the weapon rotation.x and y values so your gun doesn't go behind you if you move your mouse too much write this in the weapon sway function: weapon_holder.rotation.y = clamp(weapon_holder.rotation.y, -0.8, 0.8) you can adjust the last 2 values to your liking
Good tutorial but when you want to make a recoil for other burst types, the recoil is difficult to adjust with the curves and it does not return to its initial position , I have to constantly apply an interpolation to the original values of position and rotation of the gun. The video shows a single-shot but try an automatic or semi-automatic burst type
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!
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! :^)
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.
bro make a full fps controller and detailed one in just 10 min no in 6 hours and 30 videos the dude show us that hes into teaching no making us sleeping
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?
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 :)
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)
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
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?
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.
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.
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!
you need to add "var mouse_input = Vector2" if you look at the video at the part where he added all the @export var, you will see a bit down that he has "var mouse_input = Vector2" tho he didn't mention it.
Holy moly, this was a fantastic video! Thanks for sharing your knowledge!
Wowsers!
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
if anyone is having trouble clamping the weapon rotation.x and y values so your gun doesn't go behind you if you move your mouse too much
write this in the weapon sway function:
weapon_holder.rotation.y = clamp(weapon_holder.rotation.y, -0.8, 0.8)
you can adjust the last 2 values to your liking
best tutorial i've seen so far!
Thanks alot dude, found your video from the discord keep it up man this tutorials will blow up
love your tutorials man, thanks for uploading
Extremely useful video!
thanks man. this is what ive been lookin for
Very good tutorial, but my gun does not return after the recoil hahaha, can anyone help me?
Continuously lerp it to zero every frame
Good tutorial but when you want to make a recoil for other burst types, the recoil is difficult to adjust with the curves and it does not return to its initial position , I have to constantly apply an interpolation to the original values of position and rotation of the gun.
The video shows a single-shot but try an automatic or semi-automatic burst type
exactly what i needed love you
Added a Github link for the scripts
Yo this is great thanks for posting it in the discord so I could see it
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!
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! :^)
Really impressive video. Definitely recommend time stamps.
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.
great video! learned quite a bit from this one
when fps are too high the sway is barely noticeable when it's too low the sway is very aggressive, how do you fix that?
bro make a full fps controller and detailed one in just 10 min no in 6 hours and 30 videos the dude show us that hes into teaching no making us sleeping
I always seem to have an issue where the gun doesnt go back to it's pre-recoil position
can you send a link to the sketchfab viewmodel?
Awesome video. Keep it up!
Great vid. Keep up the good work.
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?
This is epic. thanks Jun 🙂
hola podrias dar la arma que usas en el video
What should I put in the Target of the weapon code?
THX!
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 :)
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)
Be sure to asign it in the weapon holder
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
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?
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.
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.
I noticed my event.relative is based on the fps (lower the fps higher the event.relative). Any way to fix this?
multiply by delta
VERY COOL!!!!!!!!!!!!! THANKS YOU ❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤
this is cool
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!
you need to add "var mouse_input = Vector2" if you look at the video at the part where he added all the @export var, you will see a bit down that he has "var mouse_input = Vector2" tho he didn't mention it.
perfect
Go-duh
What about clipping into walls
watch another tutorial on that
i love you
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.
What should I put in the Target of the weapon code?