Stop Repeating Code! Switch Between 1st and 3rd Person Using Components | Episode 3
Views
105
Duration
11:11
Published on
1/23/2026
In this third episode of the Godot 4 3D game development series, we explore a professional and advanced programming technique: the "Components" system. Today, we learn how to integrate both First-Person (FPS) and Third-Person (TPS) movement into a single player without repeating code by separating each system into its own independent component. The video explains how to program a button for smooth switching between perspectives during gameplay and how to organize code using class_name to simplify calling functions like camera movement and head bobbing. We also address character rotation issues and velocity handling to ensure movement remains fluid in both modes. This lesson will teach you how to write clean, scalable code—the same methodology used in major game development to ensure easy future modifications and additions.

