CameraPath - Create efficient and fast camera paths!

Hi everyone! Today I’m going to be releasing my new CameraPath module!


:gear: Overview :gear:

This module allows you to create smooth and easy camera paths using Catmull-Rom Splines (more commonly known as Cubic Hermite Splines).

NOTE: Most of this module makes use of the Catmull-Rom Spline Module by @bhristt (you can read more about this module here. I’ve used this as it simplifies a LOT of the work (and because I’m too dumb for this)

I’ll be providing examples soon, but I need to take a rest for now.


:notebook: Note :notebook:

First and foremost, you will need the CameraPath module (located here)
Once you have that, you may continue.


:notebook_with_decorative_cover: API :notebook_with_decorative_cover:

The API for this module is shown below, if you want to skip that and go straight to the example, go ahead!

Methods

Slider.new()
function CameraPath.new(points: {BasePart | Vector3}, speed: number)

Description: Creates a new camera path object which is able to control the path itself.

Notes:

  • The points table can include either a basepart or vector3 position.
  • There MUST be atleast 4 points in the array.
  • Speed is how many studs per second the camera moves at throughout the whole spline (this is relative to the splines length so you might need to adjust this)

Returns: CameraPathObject

CameraPathObject:Start()
function CameraPathObject:Start()

Description: Starts the camera path and moves it through the spline.

CameraPathObject:Pause()
function CameraPathObject:Pause()

Description: Pauses the camera path in it’s track.

Notes:

  • This will NOT revert the camera to it’s original location.
CameraPathObject:Resume()
function CameraPathObject:Resume()

Description: Resumes the camera path from where it last left off.

Notes:

  • This will not work if the camera hasn’t been paused.
CameraPathObject:Stop()
function CameraPathObject:Stop()

Description: Stops the camera path completely and reverts the camera back to where it was before the camera path started.

Connections

CameraPathObject.Completed
RBXScriptSignal CameraPathObject.Completed

Description: Fires when the camera path is completed.


:checkered_flag:Finish :checkered_flag:

That’s basically the end of this resource, this was a bit rushed as I am on holiday however I hope you all enjoy!

- Krypton :smiley:

8 Likes

Very useful and easy to use module. Definitely recommend for those who are making cinematic camera effects that require more-than linear movements. Props to Krypton!

1 Like

Update!


:notebook_with_decorative_cover: Additions :notebook_with_decorative_cover:

  • Added CameraPathObject.Completed, this fill fire when the camera path is completed.

Darn! I was hoping that it would maintain the look vector of the points that I specified. The camera looks at the next point that its going to, but I was hoping it would point in the direction that the point its traveling to is facing.