Camera movement with Bèzier curves

Hey there!

Recently I’ve watched Freya Holmér’s incredible video on Bèzier Curves and wanted to try doing something with them! The camera movement idea seemed pretty interesting, so I made this little demo of a camera traveling along a path comprised of some curves. It was a pretty nice opportunity to learn more about the Curve3D and Path3D classes, and pretty simple to do, too!

The initial idea for the scenario was to have just one mountain, created through one of the default heightmap textures, but the visible transition between the ground and skybox was bothering me so I tacked in some more mountains to hide it :laughing:

Hope you enjoy it, and that it can serve as reference for more people wanting to do something similar!

https://playground.babylonjs.com/#SGVUBC#9

14 Likes

This is a great Demo :slight_smile: I guess you could add it into the doc ?

1 Like

It MUST be in the doc :wink: cc @PirateJC

1 Like

@carolhmj this is AWESOME! Super cool!

I think this would super nicely as an addition to the Path3D doc page:

Care to give a PR on the docs a try?

I’m thinking you could add a small new section called “Objects Following A Path” or something along those lines and then just briefly explain the technique and then show the playground?

Thoughts?

5 Likes

I’d love to give it a try!

1 Like

Done: Add "Objects Following a Path" Demo. by carolhmj · Pull Request #323 · BabylonJS/Documentation · GitHub !

3 Likes

Amazing!!! Perfectly done! Merged!

GG @carolhmj !!!

1 Like

@Necips I love the atmosphere you created here !!!

1 Like

This is an awesome demo @carolhmj!