Please help me understand how to script the camera to behave like Lost Odyssey's one

Hi all,

I’m trying to replicate a Camera behaviour similar to Lost Odyssey:

Check an example from 18:40 to 19:25

As you can see their camera is constantly moving its position and rotation based on the player position in the scene.

At first I thought of a trigger based solution, but, I can’t imagine they have defined a million triggers in their scene with a million of empty gameobjects to serve as camera transform to lerp to.

It’s not a camera animation either, as the animation stops if the player stop walking, even crazier is the animation reverses if the player goes backward.

So how do you think they do it? And more important than that how could I do something similar in Unity?

looks like a combination of a basic “follow” camera with a little “on rails” thrown in. My advice, start with the follow camera tutorials, locking it down so it’s on a set path should be fairly simple once you’ve got those basics down.

1 Like

My follow camera is already working.

But thanks, I’ll try to investigate this “on rails” logic.

If you notice the camera is not moving on the Y axis very much, perhaps you could restrict it’s movement based on that and that would give you the right sort of effect? I get what you mean though, they have this kind of camera movement on a lot of final fantasy games.

Alternatively you could actually place a collision box or something on the camera itself, using an empty, then that way it will stop at a certain point from going through the ceiling and so on if that’s the kind of thing you’re looking for, you’ll need to just experiment.

Thanks for the tip but that won’t help me move the camera on a predefined path.

I think “Spline” is the keyword that will help me through this.
I found an asset that allows to do exactly the camera behaviour I want and it is based on splines.

http://support.jasperstocker.com/camera-path-animator/demos/third-person-camera-demo/

Now I’ll try to do it myself instead of just buying the asset which I’m not sure can integrate in my project (besides, where’s the fun in buying script assets).