254 lines of code generated.
Day 1 of the Kloak-project. Generated a character controller script and a custom wireframe shader.
The first-person character controller manages movement, jumping, mouse look, and camera bobbing for a basic FPS experience. Here’s a broad summary of what it does:
- Movement: Allows the player to move forward, backward, and sideways using WASD keys. Running is possible by holding Shift.
- Jumping: Implements jumping with a buffer system, so the player can jump even if they press the button slightly before landing.
- Gravity Handling: Applies gravity to keep the player grounded and smoothly transition between jumps and falls.
- Mouse Look: Handles first-person camera rotation, allowing the player to look around using the mouse. Vertical look is clamped to prevent unnatural movement.
- Camera Bobbing: Simulates head movement when walking or running by making the camera move up and down.
- Landing Effect: Adds a subtle landing bob effect to make jumps feel more natural.
- Fall Detection: Tracks how high the player gets during a jump and calculates a landing impact effect.
Overall, it provides a basic FPS movement system with effects like bobbing and buffered jumping of a more natural feel.
