Juiced Up First Person Character Controller Tutorial - Godot 3D FPS
Summary
TLDRIn this tutorial, the creator guides viewers through building a first-person character controller from scratch, integrating features like head bobbing and field of view changes to enhance the game experience. Utilizing Godot's CSG box for prototyping, the character is set up with basic movement and jump functionality. The video delves into coding details, including handling gravity, jump mechanics, and movement direction. It also covers input mapping, camera rotation, and mouse sensitivity adjustments. Additional game juice is added with head bobbing effects using sine waves and sprinting mechanics, concluding with inertia and field of view adjustments for a more immersive gameplay.
Takeaways
- 🎮 The video tutorial covers creating a first-person character controller from scratch with added 'game juice' features.
- 🏗️ The process begins by setting up a new 3D scene and using a CSG box for ground prototyping and a character body mesh for the player.
- 👾 A script is added to the character for basic movement and jumping, which works for both first and third-person perspectives.
- 💡 Lighting and a world environment are set up with a directional light to mimic the sun for a realistic look.
- 🔒 The camera is added as a child of a node 3D to prevent 'janky' rotation issues, with a reference to Godot documentation for further details.
- 📏 Constants for speed, jump velocity, and gravity are defined, with the physics process handling jumps and character movement.
- 🕹️ Custom input mapping is created to replace default UI actions, allowing for more personalized control settings.
- 🔍 The tutorial discusses handling mouse input for camera rotation, with sensitivity adjustments and clamping to limit rotation range.
- 🏃♂️ Head Bob effect is implemented using sine waves to simulate the character's footsteps, enhancing the game's immersion.
- 🔄 Inertia is added to the character's movement to prevent abrupt stops in mid-air, providing a smoother player experience.
- 🔬 The camera's field of view (FOV) changes dynamically based on the character's speed, adding another layer of realism to the gameplay.
Q & A
What is the main focus of the video?
-The video focuses on creating a first-person character controller from scratch with various game feel enhancing features, also known as game juice.
What are some of the game feel features included in the character controller?
-The game feel features include head Bob, inertia, movement, and field of view (FOV) change.
What is the purpose of using a CSG box for the ground in the 3D scene?
-The CSG box is used for its simplicity and combination with a collision shape, which is good for prototyping.
Why is the character body using an old code character body 3D?
-The old code character body 3D is used because it has a default code template with movement and jumps implemented, which works well for both first-person and third-person control.
How does the video handle the lighting in the game scene?
-The video adds a world environment and a directional light to the scene tree to imitate the sun and ensure proper lighting.
What is the purpose of adding a camera as a child of a node 3D?
-Adding a camera as a child of a node 3D acts as a pivot to avoid janky results when rotating the camera without one.
What is the issue with the default UI actions in the character controller code?
-The default UI actions are replaced with custom ones to allow for more control over the character's movement and interactions.
How does the video address the problem of the character not moving in the direction it's facing?
-The video suggests setting the direction of movement to where the head is facing instead of the character body, as the head is responsible for looking left and right.
What mathematical function is used to implement the head Bob feature?
-The sine wave function is used to implement the head Bob feature, which moves the camera up and down to imitate footsteps.
How is the sprinting mechanic integrated into the character controller?
-Sprinting is integrated by changing the character's speed variable based on whether the shift key is pressed, with separate constants for walk speed and sprint speed.
What is the purpose of the inertia in the character controller?
-Inertia is added to give the player more control over horizontal movement in the air and to ensure a smoother transition when the player stops moving mid-air.
How does the video change the camera field of view based on character speed?
-The video uses a formula that adds a base FOV and a FOV change multiplied by the character's velocity, clamping the velocity to ensure the FOV doesn't become too extreme.
Outlines
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowMindmap
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowKeywords
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowHighlights
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowTranscripts
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowBrowse More Related Video
Attack Animation and Movement Lock - 2D Platformer Crash Course in Unity 2022 (Part 12)
How To Make A Video Game - GDevelop Beginner Tutorial
How To Make a Topdown RPG in Godot 4: Adding The Player (Part 1)
Player Movement & Animation | 2D Platformer Game Tutorial with Construct 3 #1
JUMP GAME DI SCRATCH | JUMPING GAME SCRATCH | MAPEL INFORMATIKA
Lecture: 14 | WATER BOAT GAME IN SCRATCH | GAME DEVELOPMENT | SCRATCH TUTORIAL
5.0 / 5 (0 votes)