I really appreciate this tutorial and your other tutorials. I would like to say that I found making separate menu and main menu scripts ends up being somewhat redundant as all processes could be handled within a single script. I say this because I ran into an issue where when I tried to create an options menu for the main menu and attached the "menu.gd" script to both scenes. When I next opened my project Godot told me the main menu and options menu scenes were corrupted and could not be opened. Neither file was corrupted but a dependency related to the "menu.gd" was definitely the cause, because editing the ".tscn" files to remove the script extensions and then deleting "menu.gd" and copying its text into "main_menu.gd" fixed everything.
i had an issue where my bullet would spawn and immediately crash. i fixed it by replacing the movement in _process for the bullet with " translate(Vector3(0, 0, -SPEED) * delta) ". no idea why the other one wasn't working, but this does, and i think it's simpler anyway
I just want you to know, that making a tutorial on the sun itself would be huge. its making my solar system much easier now that I know how to use shaders thanks to you
Not sure who needs to hear this but you need to make sure the RayCast3D on your bullet is set to Collide with Area3D objects (do this in the inspector tab), otherwise the bullets will sail straight through the enemy hurtbox and do no damage.
Fantastic! I am an mobile developer and I exploring Godot engine for the first time. This tutorial gave me so much motivation to develop my own game. Thank you.
Help! I've noticed this tutorial is a bit old, but it's honestly the best I've found, so far- Everything works up to the part where you change the movement to be tied to the camera. Once I hit that part, GODOT throws an error "Error at (38, 23): Cannot infer the type of "direction" variable because the value doesn't have a set type." The line it's upset about says this: var direction := (head.transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized() As far as I can tell, every line is the same as in the video, so I can only assume something changed with a recent update? If anyone could help, that would be amazing
I ran into this problem as well. Some things have changed since this tutorial released. Anyway, I fixed it by replacing "head" with the charactercontroller3d. Drag and drop it into the code. It'll rotate the entire body, but that's ok, most games do that when seen from a 3rd person perspective. Heads up, if you are on 4.3 like me, headbob doesn't work either. Still trying to figure it out.
@@LiterallyMe459 found this on a forum post, remove the colon ":" after "direction" from var direction := (head.transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized() and it works
Im a C# dev, I use unity and other softweres, you have this comment to tell me how godot is (in your opinion) better than unity I also have questions Question one can you make a pathcaster(more complex raycasting) shader in godot do you have the ability to convert complex/resource intensive math to a compute shader is there a way to change the scripting language And I do have others just not too important right now
Hello, i have a more easy way to set the sprint fov. if Input.is_action_pressed("Sprint"): SPEED = SPRINT_SPEED #Your speed and sprint speed var Camera.fov += 1 Camera.fov = clamp(camera.fov,60,90) #90 is the fov when your sprinting and 60 is the fov when walking. else: SPEED = WALK_SPEED #Your speed and walkspeed var Camera.fov -= 1 Camera.fov = clamp(Camera.fov,60,90)
Línea 39:Unexpected "if" in class body. Línea 40:Unexpected "Indent" in class body. Línea 41:Unexpected "Indent" in class body. Línea 43:Expected end of file.
btw i found that this works better for the func _process delta on the projectile extends Node3D const SPEED = 40 @onready var mesh = $MeshInstance3D @onready var ray = $RayCast3D func _process(delta): var movement = Vector3(0, 0, -SPEED) * delta position += transform.basis * movement
Hi, thank you very much for this tutorial. And could you please tell me? How can I hide polygons that are not being framed at the moment, otherwise I'm making a game for phones and fps leaves much to be desired. 😅
Excellent tutorial with progressive difficutly. But for those who are not familiar with gdscript you can simply use an "animationPlayer" to make head movement (for exemple), it works very well.
Great Tutorial! Only issue I have is that my camera movement doesn't feel as smooth as I want it to be. It does not seem like a fully fluent motion but more like the camera jumps a few pixels every time i move my mouse. Is there anny solution?
Hello! Thank you for this awesome tutorial, but i have an error and dont know how to fix it: When using the head bob, my camera position goes below the player. I tried changing the camera initial position but it still looks the same. Im providing you the code: extends CharacterBody3D const SPEED = 5.0 const JUMP_VELOCITY = 4.5 const SENSITIVITY = 0.003 #bob variables const BOB_FREQ = 2.0 const BOB_AMP = 0.08 var t_bob = 0.0 var gravity = 9.8 var cursor_visible = false @onready var head = $Head @onready var camera = $Head/Camera3D func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) func _unhandled_input(event): if event is InputEventMouseMotion: head.rotate_y(-event.relative.x * SENSITIVITY) camera.rotate_x(-event.relative.y * SENSITIVITY) camera.rotation.x = clamp(camera.rotation.x, deg_to_rad(-60), deg_to_rad(90)) if event.is_action_pressed("ui_cancel"): # ESC key toggle_cursor() func _physics_process(delta): if not is_on_floor(): velocity.y -= gravity * delta if Input.is_action_just_pressed("jump") and is_on_floor(): velocity.y = JUMP_VELOCITY var input_dir = Input.get_vector("left", "right", "up", "down") var direction = (head.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) # Head bob t_bob += delta * velocity.length() * float(is_on_floor()) camera.transform.origin = _headbob(t_bob) move_and_slide() func _headbob(time) -> Vector3: var pos = Vector3.ZERO pos.y = sin(time * BOB_FREQ) * BOB_AMP return pos func toggle_cursor(): cursor_visible = !cursor_visible if cursor_visible: Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) else: Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
Thank you so much for this tutorial, it really helped! By the way, any idea how to make the enemy not jiggle when it comes to the edge of the navigation region? For some reason it freaks out when touches the edges of this area, it always moves at the speed of light and just rotates back-forth
I can't change the materials on the models for some reason. When i try that it says that i cant change materials on imported models. Does anyone know how i can fix this? Because i've seen other people do it
please make a save and load system with the world generation, it will help me understand gdscript chunk system very well and saving/load systems since your explanation is amazing!
Why is mine different When i add the vehicle wheel to the tires, it is added at the center , thats the car bodies position I mean when i add the wheel as a child to the "circle" its puts the node at yhe center Also when i click on the tire that red, green and blue stuff that appears, it appears at the center of the car and not on the tire But that orange square shows up on the tire Any help please 🙏🏽