Post

I've spent *years* researching 3D Platformer Cameras in hopes of making Slime 64's camera "not terrible." In this thread, the White Cylinder is the Camera Target (slightly above the player!), and the Orange Cones represent the "vertical dead zone" where the camera won't follow player movement.

When performing a standard jump on flat ground, the camera essentially doesn't move. However under normal gameplay, if the player moves up far enough to surpass the deadzone, the camera target pretty quickly (but smoothly!) lerps up to keep them in frame. Similarly the same happens when descending.

When airborne we raycast down to see if the player is near any ground. If they are, and the grounded camera position would be *higher* than its current position, it ascends to match. Notice how the camera doesn't descend when going downhill. This prevents undesired "dips", as seen in Yooka-Laylee.

However, these systems aren't enough on their own. Player action should always inform camera behavior. When the player double jumps, they have indicated they want more height. We snap the camera's vertical target to match where they performed the double jump, and then resume normal behavior.

Similarly, we have a limited-range flight ability. Since we expect more vertical gameplay while using this power, we make the camera target more aggressively lerp towards the player's vertical position, essentially bypassing the deadzone. Note the difference between an air jump and a normal jump.

All together now! This is back with auto camera direction and lookahead enabled, which I disabled for the above clips to demonstrate the vertical behavior. I'm very pleased with how it's developed! It feels like the camera frames what I would expect to see very well through various gamestates.

That's all I've got for now. Any developers have other camera tips to share, or questions about my approach? Also tell me a game camera and I'll tell you if I've researched it as part of this endeavor lmao

I'm truly so happy to hear I'm not alone 😂😂 I'm sure if I started over I could build it more clearly but by God it works right now and I'd rather spend that time finishing the rest of the game

The first step to making a good camera for my game was accepting that I'm not making a general purpose camera system, but am controlling the camera for my game specifically

0 reposts1 like

that is a huge consideration. like, I am pretty sure your vertical tracking control is exactly the opposite of mine. I'm trying to always show roughly how far away the ground is. I don't actually care if the player goes off the top of the screen briefly. I'm looking at a point towards its shadow

That makes total sense. Puppy Truck needs the player to have a much greater sense of their place relative to the environment - you've got orbital motion, unbelievable bursts of speed... It's a way harder problem than Slime's movement 😅 seriously incredible stuff and I'm very excited to buy one day