Bind camera to projectile

I’m looking to bind the client’s viewport camera to a projectile (similar to the redeemer’s alternate fire in Unreal Tournament) and then steer the projectile. How would I go about doing that?

viewport you mean like the viewportframe and you want the viewportframe’s camera to follow the projectile from the workspace or the viewportframe?

You can use BindToRenderStep to bind a function to run on each frame, see the task scheduler for more information on that.

I’m not familiar on the controls or mechanics of Redeemer’s Alternate Fire but I’ll shoot how I’d do this if I was you.

Set the camera to scriptable, update the CFrame to the projectile’s CFrame in our function which was binded to render step.

For steering, I’m assuming it’s mouse orientated so I’d take a look at how far the mouse is from the center of the screen in offset. To get the center of the screen you can do something like this:

Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2)

You can get the mouse’s X and Y position using mouse.X and mouse.Y, you can then take the relevant checks to determine the direction to steer the projectile in.

Viewport is what the player sees on their screen via the camera. The camera is mounted on the front of the projectile. So as the projectile travels through 3D space, the camera travels with it.

Basically like this: Unreal Tournament : Redeemer guide - YouTube or like this: Evolution of the Redeemer - YouTube.

You can just use the RunService to update the camera then disconnect it when the projectile hit something.