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.

4 reposts69 likes

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

The Devil Inside? (it's not actually relevant lmao, but I like to reference it in game cam discussions 'cos it's one of the few games I can think of with a "2nd person" camera - you're followed by a film crew & one of the camera modes is "Live Camera" which is the view of the camera-operator NPC)

But then I need code paths to track those code paths, which will then need more code to track those code paths.... Really one of the scenarios is a PANIC mode where the player is moving way too fast to track. I'm not even sure it's possible to hit those speeds but if so that's the achievement 😅

I have a question. Is there any issues with ground being clipped between the camera and the character? I think there was an old GDC talk on cameras, and they talked about the Journey thing for those kinds of clippings.

This is absolutely an issue to think about! 2 things: - When looking up we cheat the camera upwards a bit to avoid hitting the ground - A lot of games go with the "render the silhouette of the character on top of any occluding geometry" approach, but we went with a shader cutout effect, like so: