What a coincidence! Now I am learning from the 20 videos series! After i learn how to use unity i'll learn how to use godot with your videos. And thanks for the work you are doing for use!
16:11 btw you don't need to replace the node, you can press the + icon in the top left to add any node as the base node, honestly didn't know you could change node types, that's very helpful
for the people that the code in the video doesnt work with them yse this extends Node3D var sens: float = 0.005 func _ready() -> void: Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) func _input(event: InputEvent) -> void: if event is InputEventMouseMotion: get_parent().rotate_y(-event.relative.x * sens) rotate_x(-event.relative.y * sens) rotation.x = clamp(rotation.x, deg_to_rad(-90), deg_to_rad(90))
It says there's something wrong with the camera script because of the event, so then i changed every "event" to inputeventmousemotion. Then it says that only line 9 is wrong
If you make a change to a duplicated nodes it changes all of the duplicates and the oringals, I have worked with godot before but never had an issue like this
got it working oops, always comment then find the answer immediately, make sure you don't write up down when putting in movement names, i did that instead of foward and back
Sometimes when following directions on videos like these, you can make mistakes and you won't know exactly what you did wrong. What I did just a second ago was pull up Chat GPT, take a picture of the script with your phone and ask Chat GPT how to fix it and it will tell you what you did wrong. I accidentally put red instead of rad in the script and forgot a parenthesis and it told me what I did wrong and how to fix it. Just a little tip for you folks
Im actually trying to do a Silent Hill style game for mobiles with Godot, Blender and ChatGPT 😂 i know nothing of coding or modeling but im trying and ChatGPT is very useful
I had the same issue, you gotta make sure the collision shapes for the walls are the same as the mesh instances, otherwise the collision shapes are spawning on top of the player and causing it to fall through the map
Hello, i adjusted the camera script and managed to fix it, here is the new one: extends Node3D @export var mouse_sensitivity: Vector2 = Vector2(0.1, 0.1) @onready var camera = $Camera3D func _ready(): # Capture the mouse and hide the cursor Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) func _unhandled_input(event): if event is InputEventMouseMotion: # Rotate the head (up/down) around the local X axis rotation_degrees.x -= event.relative.y * mouse_sensitivity.y # Clamp the X rotation to avoid flipping (looking too far up or down) rotation_degrees.x = clamp(rotation_degrees.x, -90, 90) # Rotate the player (left/right) around the Y axis (world axis) get_parent().rotation_degrees.y -= event.relative.x * mouse_sensitivity.x let me know if it works!
I had the same issue, you gotta make sure the collision shapes for the walls are the same as the mesh instances, otherwise the collision shapes are spawning on top of the player and causing it to fall through the map
my movement doesn't follow the camera, e.g i move in the same direction no matter why the camera moves but i copied the camera code word for word. any ideas?
camera code: extends Node3D var sens: float = 0.005 func _ready() -> void: Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) func _input(event: InputEvent) -> void: if event is InputEventMouseMotion: get_parent().rotate_y(-event.relative.x * sens) rotate_x(-event.relative.y * sens) rotation.x = clamp(rotation.x, deg_to_rad(-90), deg_to_rad(90)) player code extends CharacterBody3D const SPEED = 5.0 const JUMP_VELOCITY = 4.5
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("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", "forward", "backward") 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()
hi could i use your videos and put them in the website im making i will you you the credits because i want to share how i made my games but i use these tutorials for it
I have done exactly what you have taught in this tutorial but whenever I run the game to test if everything is fine or not the player starts to fall through the floor so what should I do
I had the same issue, you gotta make sure the collision shapes for the walls are the same as the mesh instances, otherwise the collision shapes are spawning on top of the player and causing it to fall through the map
DO NOT attempt to implement controller support at this early stage! I got baited so hard by that offhand "if you wanna set controller inputs that's fine, you can totally do that" Sure, mapping walk-strafing around to directions on a left analog stick in that interface is dead easy... But if you do that, you'll want to get the right stick looking around, and that's SUPER complicated by comparison and needs to happen in the _physics_process at the player script level so that it updates constantly while the stick is held still in a direction, (this camera script only needs to update when the mouse moves) Ditto if you want to get the left stick movement to be faster or slower based on how far you tilt, just settle for M+K control until your project is MUCH farther along than this.
I'll be showing how to do controller input-mapping for turning your first person player camera with analog sticks in a future part. You can still set other controller inputs if you like for now though.
@@Omogonix also watched your slender tutorial a while back but scrapped my project because it got corrupted and lost motivation 😂 But was also a good tutorial ✌️
I've been waiting for this for so long.
What a coincidence!
Now I am learning from the 20 videos series!
After i learn how to use unity i'll learn how to use godot with your videos.
And thanks for the work you are doing for use!
16:11 btw you don't need to replace the node, you can press the + icon in the top left to add any node as the base node, honestly didn't know you could change node types, that's very helpful
Thank you so much for doing a horror tutorial. All I could find was FPS until I stumbled on this. Solid work and I can’t wait to watch the rest.
great tutorial Looking forward to part 2
Yo, so looking forward to it!
Head node script
extends Node3D
var sens = 0.005
func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
get_parent().rotate_y(-event.relative.x * sens)
rotate_x(-event.relative.y * sens)
rotation.x = clamp(rotation.x, deg_to_rad (-90), deg_to_rad (90))
Thank you bro
@@Swag22ify np
THANK you pro
this tutorial might be the best one ive watched
you realy helped me with game dev thank you
1 of my things are not green what do I do
20:06
33:44 man i was getting pretty frustated in this part, but guess what?
i just forget to not capitalize the I in the "func _input
BRO, THAT IS PRECISELY WHAT I NEEDED!! IVE BEEN STUCK THERE FOR HOURS, THANK YOU SOOO MUCH!!! GOD BLESS YOU!
I really want to make my own horror, thank you so much for the tutorial!!!!!!!
30:31 My void is green and not red why?
same here im copying it exactly and its not working
its probably just a version thing
for the people that the code in the video doesnt work with them yse this
extends Node3D
var sens: float = 0.005
func _ready() -> void:
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
get_parent().rotate_y(-event.relative.x * sens)
rotate_x(-event.relative.y * sens)
rotation.x = clamp(rotation.x, deg_to_rad(-90), deg_to_rad(90))
just saved me so much headache 🙏
i had literally never noticed the lighting preview/worldenvironment preview buttons. I can never notice these viewport gizmo widgets lol
20:03 what if everything isn’t green like the bottom text?
It says there's something wrong with the camera script because of the event, so then i changed every "event" to inputeventmousemotion. Then it says that only line 9 is wrong
29:14
i have issue when i write the same thing u write . what should i do plz ?
I had issues there too, I tried it later and it worked,. so I think it's just a small mistake but I don't know
@@xos8883 thanks a lot
did you capitalize everything? gdscript is case sensitive, what's the issue you are having?
use chat gpt maybe you made a typo or smth
If you make a change to a duplicated nodes it changes all of the duplicates and the oringals, I have worked with godot before but never had an issue like this
Love ur accent. Excited for this series. Can u do one on like dragging or picking up a body lol
The code rotation.x = champ(rotation.x, deg_to_rad(-90), deg_to_rad(90)) he cause errors in godot engine.....what i can do?
I just finished the episode, but icant seem to move forward or back, but can jump and left and right
got it working oops, always comment then find the answer immediately, make sure you don't write up down when putting in movement names, i did that instead of foward and back
20:55 constant can’t change,variables can
Awesome tutorial!
34:40 I can’t find the project button at the top of the screen
Sometimes when following directions on videos like these, you can make mistakes and you won't know exactly what you did wrong. What I did just a second ago was pull up Chat GPT, take a picture of the script with your phone and ask Chat GPT how to fix it and it will tell you what you did wrong. I accidentally put red instead of rad in the script and forgot a parenthesis and it told me what I did wrong and how to fix it. Just a little tip for you folks
That’s why I always check the comment section! Because people point them out so the others won’t also do the same mistake.
Im actually trying to do a Silent Hill style game for mobiles with Godot, Blender and ChatGPT 😂 i know nothing of coding or modeling but im trying and ChatGPT is very useful
Why is the capsule falling through the map
I had the same issue, you gotta make sure the collision shapes for the walls are the same as the mesh instances, otherwise the collision shapes are spawning on top of the player and causing it to fall through the map
for some reason my player keeps falling through the floor, what did i do wrong? i rewatched the video and did everything that was shown
Hello, i adjusted the camera script and managed to fix it, here is the new one:
extends Node3D
@export var mouse_sensitivity: Vector2 = Vector2(0.1, 0.1)
@onready var camera = $Camera3D
func _ready():
# Capture the mouse and hide the cursor
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _unhandled_input(event):
if event is InputEventMouseMotion:
# Rotate the head (up/down) around the local X axis
rotation_degrees.x -= event.relative.y * mouse_sensitivity.y
# Clamp the X rotation to avoid flipping (looking too far up or down)
rotation_degrees.x = clamp(rotation_degrees.x, -90, 90)
# Rotate the player (left/right) around the Y axis (world axis)
get_parent().rotation_degrees.y -= event.relative.x * mouse_sensitivity.x
let me know if it works!
I had the same issue, you gotta make sure the collision shapes for the walls are the same as the mesh instances, otherwise the collision shapes are spawning on top of the player and causing it to fall through the map
my movement doesn't follow the camera, e.g i move in the same direction no matter why the camera moves but i copied the camera code word for word. any ideas?
camera code:
extends Node3D
var sens: float = 0.005
func _ready() -> void:
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
get_parent().rotate_y(-event.relative.x * sens)
rotate_x(-event.relative.y * sens)
rotation.x = clamp(rotation.x, deg_to_rad(-90), deg_to_rad(90))
player code
extends CharacterBody3D
const SPEED = 5.0
const JUMP_VELOCITY = 4.5
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("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", "forward", "backward")
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()
why can I not import my player in my level?
I don't know what I did wrong by my player just falls through the world
for som reason the camera node says that is an error on "rotation_x"
you need rotation.x
ask chatgpt it can help you
hi could i use your videos and put them in the website im making i will you you the credits because i want to share how i made my games but i use these tutorials for it
not sure what ive done wrong as i have your script copied out exactly but when i press play my character doesnt move at all. please help!
check your code with chat gpt
maybe you made a typo
all other first person tutorials are complex even thos this is a horror game tutorial holy this is good on to part 2
I have done exactly what you have taught in this tutorial but whenever I run the game to test if everything is fine or not the player starts to fall through the floor so what should I do
your floor does not have collision
add a collision shape 3d and make sure your player is on it
How do I escape?
@Omogonix Is it okay to I use mobile?
Não sei fazer a câmera funcionar
What’s the difference between a CSGBox3D and a StaticBody3d/MeshInstance3D?
the difference is that the csg box has integrated collision (you need to activate it), whereas the mesh instance you have to implement 1
how did u duplicate the wall
Control D
I am waiting for part 2
great tutorial
Hey does the coding change when grapiicks when ı cahange vulkan to OpenGL
Nope
Cool bro ❤
Will the tutorial require forward plus? Or can i do it compatibly
You can use compatibility mode if you like, Forward Plus makes use of extra graphics features but the functionality and stuff all works the same! :)
@@Omogonix bro you have turned on the type hint but why you still write manually
nice tutorial bro keep going
hello can i make script of camera follows player?
Yes, that is possible
I can't look around when I start the game
Left click with mouse or try presseng shift + f1 or idk
Shift+f also press it again to leave it
@@_TechInsightHub thx
thx
I just fall through the map plz help me
I had the same issue, you gotta make sure the collision shapes for the walls are the same as the mesh instances, otherwise the collision shapes are spawning on top of the player and causing it to fall through the map
DO NOT attempt to implement controller support at this early stage!
I got baited so hard by that offhand "if you wanna set controller inputs that's fine, you can totally do that"
Sure, mapping walk-strafing around to directions on a left analog stick in that interface is dead easy...
But if you do that, you'll want to get the right stick looking around, and that's SUPER complicated by comparison and needs to happen in the _physics_process at the player script level so that it updates constantly while the stick is held still in a direction, (this camera script only needs to update when the mouse moves)
Ditto if you want to get the left stick movement to be faster or slower based on how far you tilt, just settle for M+K control until your project is MUCH farther along than this.
I'll be showing how to do controller input-mapping for turning your first person player camera with analog sticks in a future part. You can still set other controller inputs if you like for now though.
ty master
Nvmd I did something wrong but now I fixed it
complimenti bravo continua cosi, fai altri contenuti su godot 3d grazie
Damm when cuby snow man and obunga is coming😢❤
17:03 Ok
if someone is also stuck in the game window: alt F4 - to close it
That doesn't work
@@WesleyGrayIthink Press F8
looks like im downloading godot 4 (im now gonna have unity, unreal, and godot installed i need a pick an engine lol)
Bro which language we use in it?😊
Gdscript
Nice
Part 2 NOW
pls make a fps game pls i always wanted to make a shooting game pls bro i beg u
“So yeah”
Can you please make a toturial for Godot 3
just use the newest one lmao
atleast youexplain what you're doing... i just watched a tutorial and the person didnt explain a single thing and only did them without explaining...
Thanks, sometimes I think ramble on about things for too long but glad you like the explanations! :D
@@Omogonix also watched your slender tutorial a while back but scrapped my project because it got corrupted and lost motivation 😂
But was also a good tutorial ✌️
Would u be able to jump in vc with me and help for a few mins or so? Any one
Well uhhh, godot removed all my projects, so here i am again lol
don't set player detail to 999999999999 will crash pc
What are you thinking man ofcourse it would
global al worked strait away powerful pc esay
brutha stop yapping
Why is gravity not a constant? It isn't going to change.
this tutorial made me use godot more thank u 🫶🫶🫶
great tutorial