Awesome tut, very detailed disclosure of the topic, great result at the end! To slightly more improve the volumetric effect you could increase the Volume size and Volume Depth in project settings.
Please Note A Few Things: 1. The flashlight effect seen in the intro is achieved by adding another SpotLight to the existing SpotLight as a child, then increasing it's radius and lowering it's brightness and fog. 2. You should normalize the direction before multiplying it by the speed so you're always moving the same speed at any direction, to normalize just add .normalize() after direction, however since we're using the Lerp method it's not super obvious. 3. If you set the camera acceleration too low then the flashlight can move way faster than the camera and move out the screen, you can try to limit the flashlight rotation to -90 and +90 based on the player's forward transform (head.basis.z), tell me in the comments if you want a video for it. 4. Sometimes you can see the starting point of the flashlight when you look down, too fix that adjust the Z axis of the SpotLight. 5. Since this video was more about the realistic aspect of a indie horror game I didn't implement the logic for turning it off and on, if you want a part 2 of this video where I fix all of these issues please like this comment.
You are correct! You should normalize direction in any game you're making but I think in this example since we're using the Lerp function it's not super noticable.
Hello friend, congratulations on your work, I'm looking for content about Godot because I intend to start in the area of game creation, and I found your channel and found it very interesting, what do you recommend for me who wants to start in this area? start with 2d or 3d games? Tips, what to study, how to get started, free courses preferably (I'm unemployed at the moment hahaha) Thank you for your attention, peace and success for you and your channel!!!
Hey man I'm happy you liked this tutorial, it really depends what you want to develop do you want to make 2d games ? Start with 2d, you like making 3d games then you should start with 3d, although if you learn any of them switching to next one shouldn't be hard.
Found it really useful. Thank you! I would also like to see the solution of making flashlight turn on and off. But for now I'll try to figure it out myself. upd: Alright. I managed to solve it by changing the value of light energy. Idk if this is the best option in terms of performance.
it was a great video but since the character's body doesn't rotate neither does the flashlight and it clips behind the character and creates a shadow. But over all this video gives people a chance to learn the basics.
This is the fourth tutorial I've watched on flash lights. Your tutorial is good. EXCEPT one thing is really starting to bug me.... How do you turn the flashlight on and off. I don't think I've ever played a game in which the flashlight cannot be turned on /off yet after four tutorials from people clearly cleverer than I, and still I have yet to know how to do this.
this tutorial is awesome!! i followed it and it's perfect. only the spotlight can do a 360 (as in, turning it too much makes it face the player, where you can't even see the light anymore) which is a little bit odd. i don't know if this happens in the original code in the video. is there a way to stop that??
If, say, i decided to choose my light source to be a candle, how would i extend the candle out? Should i use transform or translate or what should i do?
helloo my when i drag my flashlight left or right it goes diagonally upwards and downwards and if i drag my mouse up and down nothing happens with it? i donno what i did wrong HELP PLZ
Great tut.... I built it as per the tut. But I have a small issue when you move around the light beam in the fog trails behind the light movement so the beam becomes really wide, like it has some persistence then when you stop movement the light beam is fine. Any idea what might be causing this ?
Hi michael, I'm glad you enjoyed this tutorial, in dark scenarios the fog does leave behind a trail due to the Temproal Reprojection In The Volumetric Light Settings on World Environment Node. Just disable Temporal Reprojection or adjust the amount of it to get rid of the trail.
Hi I dont know if your gonna read this but,im struggling to make a switch for it like my input map is f and when i test for values using input func and if statememt to test if spotlight.show is true and and switch is pressed it doesnt work,well please give me another method on how to do this thanks,great coding btw😊
Please don't add mouse acceleration to a FPS style head controller, that's awful to control and nausea inducing. I suppose it's useful to know how to do, especially for keyboard controls where acceleration is necessary, and controllers where it can be helpful. But it shouldn't be used for mouse input events, or at the very, *very* least be an option.
I guess that depends on the person playing the game, also the example on this video was way too much, you would probably use a much reasonable value for acceleration in a real game. however I agree adding an option to disable this.
I'm really hype about using Godot since 4.3 coming soon
This video actually helped me get a grasp of some concepts in Godot after transitioning from another engine. Thanks!
Glad it helped you.
Awesome tut, very detailed disclosure of the topic, great result at the end! To slightly more improve the volumetric effect you could increase the Volume size and Volume Depth in project settings.
Please Note A Few Things:
1. The flashlight effect seen in the intro is achieved by adding another SpotLight to the existing SpotLight as a child, then increasing it's radius and lowering it's brightness and fog.
2. You should normalize the direction before multiplying it by the speed so you're always moving the same speed at any direction, to normalize just add .normalize() after direction, however since we're using the Lerp method it's not super obvious.
3. If you set the camera acceleration too low then the flashlight can move way faster than the camera and move out the screen, you can try to limit the flashlight rotation to -90 and +90 based on the player's forward transform (head.basis.z),
tell me in the comments if you want a video for it.
4. Sometimes you can see the starting point of the flashlight when you look down, too fix that adjust the Z axis of the SpotLight.
5. Since this video was more about the realistic aspect of a indie horror game I didn't implement the logic for turning it off and on, if you want a part 2 of this video where I fix all of these issues please like this comment.
any chance you could throw the code or explain how to do the third one, limiting the max rotation? would be much appreciated
what to do when you look down and the flashlight doesn't follow
Deserve more likes and views, good vid🎉
Well done! I didn't know it was that easy to project an image. Instant subscribe 😎
I was finding that camera movement but i didn't expect finds that on this video
I might use Godot to make a horror game since I like horror movies
17:44 is what you clicked for
Ur the chosen one
i believe you also need to normalize your direction so that you dont move faster when going diagonal.
You are correct! You should normalize direction in any game you're making but I think in this example since we're using the Lerp function it's not super noticable.
Hello friend, congratulations on your work, I'm looking for content about Godot because I intend to start in the area of game creation, and I found your channel and found it very interesting, what do you recommend for me who wants to start in this area? start with 2d or 3d games?
Tips, what to study, how to get started, free courses preferably (I'm unemployed at the moment hahaha)
Thank you for your attention, peace and success for you and your channel!!!
Hey man I'm happy you liked this tutorial, it really depends what you want to develop do you want to make 2d games ? Start with 2d, you like making 3d games then you should start with 3d, although if you learn any of them switching to next one shouldn't be hard.
Found it really useful. Thank you! I would also like to see the solution of making flashlight turn on and off. But for now I'll try to figure it out myself.
upd: Alright. I managed to solve it by changing the value of light energy. Idk if this is the best option in terms of performance.
You can also make it invisible,
hand.visible = !hand.visible
Thanks mate!!
it was a great video but since the character's body doesn't rotate neither does the flashlight and it clips behind the character and creates a shadow. But over all this video gives people a chance to learn the basics.
This man is sigmA
This is the fourth tutorial I've watched on flash lights. Your tutorial is good. EXCEPT one thing is really starting to bug me.... How do you turn the flashlight on and off. I don't think I've ever played a game in which the flashlight cannot be turned on /off yet after four tutorials from people clearly cleverer than I, and still I have yet to know how to do this.
Hey, Thanks for watching!
The simplest thing that I can think of is this:
If Input.is_action_just_pressed("YOUR_ACTION):
hand.visible = !hand.visible
this tutorial is awesome!!
i followed it and it's perfect.
only the spotlight can do a 360 (as in, turning it too much makes it face the player, where you can't even see the light anymore) which is a little bit odd. i don't know if this happens in the original code in the video.
is there a way to stop that??
If, say, i decided to choose my light source to be a candle, how would i extend the candle out?
Should i use transform or translate or what should i do?
If you mean an OmniLight then you could increase the radius, but I would say use a spot light with a high radius
It's out but it's 4.3 beta
helloo my when i drag my flashlight left or right it goes diagonally upwards and downwards and if i drag my mouse up and down nothing happens with it? i donno what i did wrong HELP PLZ
Make sure your code is exactly as mine,
Also make sure you attach the scripts to the correct node.
Great tut....
I built it as per the tut. But I have a small issue when you move around the light beam in the fog trails behind the light movement so the beam becomes really wide, like it has some persistence then when you stop movement the light beam is fine. Any idea what might be causing this ?
Hi michael, I'm glad you enjoyed this tutorial, in dark scenarios the fog does leave behind a trail due to the Temproal Reprojection In The Volumetric Light Settings on World Environment Node. Just disable Temporal Reprojection or adjust the amount of it to get rid of the trail.
@@Code_It_All That worked, thanks again.
Hi I dont know if your gonna read this but,im struggling to make a switch for it like my input map is f and when i test for values using input func and if statememt to test if spotlight.show is true and and switch is pressed it doesnt work,well please give me another method on how to do this thanks,great coding btw😊
Hello !
You can toggle flashlight with this:
if Input.is_action_just_pressed("action name"):
hand.visible = !hand.visible
@@Code_It_All awesome,your the goat thanks
I seem to get Null error on camera3D and hand
Make sure you refence the camera and hand correctly,
Or you can just export camera and hand and then drag them in the spot.
verry cool
my camera goes diagonal i dunno why please help
Hey, Are you sure you're NOT doing both of the rotations on the same node ?
Please don't add mouse acceleration to a FPS style head controller, that's awful to control and nausea inducing.
I suppose it's useful to know how to do, especially for keyboard controls where acceleration is necessary, and controllers where it can be helpful. But it shouldn't be used for mouse input events, or at the very, *very* least be an option.
I guess that depends on the person playing the game, also the example on this video was way too much, you would probably use a much reasonable value for acceleration in a real game.
however I agree adding an option to disable this.
🤩 *Promosm*