I’m sure a lot of you have heard of REANIMAL, the game from the Little Nightmares devs, and after watching this video and playing this game (off topic, but it was very fun) I was trying to think of ways to recreate the dynamic camera system they have but I can’t wrap my head around it
Does anyone have any ideas?
Link to gameplay
Looks like camera movement is detached from the subject. My guess is they track the ideal position of the camera that strictly follows behind the subject (ex: behind and above the boat), then a separate, constantly active camera script moves and orients the camera every frame toward this target. Additionally, when looking around, it appears that the camera moves as it rotates to keep the subject in center.
I’d make a script to permanently set the camera type to scriptable, and run every frame to check (or calculate) the latest ideal camera CFrame, then lerp toward this target. This will allow you to apply dynamic modifiers that change the target or affect the lerp speed or whatever.
That being said, it also looks like the camera follows a preprogrammed path, which makes it easier to glide over boulders or aim in the right direction. You’d achieve this by having a path (of nodes) that the camera is positioned on, with a set direction to look at, and have the camera try to gravitate as close as it can to the subject without leaving the path.
How would you determine which node to hover around? Would you base it off of the midpoint between the players and whatever node is the closest or some other factor?
If you’re making a path of nodes for a level in the game, you’d have the camera calculate a path between the nodes (preferably curved paths – ask your friendly AI for help), and move the camera along the path by having it stay as close to the player as it can. You can program orientations using the orientation of nodes if you want the camera to face certain directions (factor orientation alongside position for the path). When the camera system runs every frame, it grabs the cached path (created at level start), moves/rotates at the desired speed toward the target along the path (which is basically toward the player), and applies any modifiers like the player looking a certain direction to adjust the position/rotation.