Orbit Camera | Technical Documentation

Thanks for your interest in the Orbit Camera, the first entry in my Starship Sandbox series of assets designed to help you create your own space flight simulation games. This page contains a breakdown of the Blueprint Content found in the project to help you pull it apart and adapt it for your own needs.

Need help?

If you have any questions or concerns you may find them addressed in the Frequently Asked Questions section at the bottom of this page. If you can’t find what you’re looking for you can reach me at nick@techarthub.com and in the techarthub Community Discord server.

Table of Contents

BP_OrbitCamera_AC

All of the logic that operates the Orbit Camera can be found within the BP_OrbitCamera_AC Actor Component, making it dead simple to drag and drop the system onto your own Actors. This is demonstrated in the project’s BP_DemoCharacter, a rocket ship pawn adapted from the one in found in Epic’s Content Examples project.

The Demo Character also comes with a dynamic SkySphere (well, SpaceSphere) which has a nebula panorama Material applied. This is mostly to help illustrate camera movement for the demo, but I must admit it was a lot of fun to make!

Camera Modes

To make things as easy to understand as possible I’ve subdivided the behaviour of the Orbit Camera into 4 distinct modes. Based on your input the camera will intuitively switch between these modes.

My apologies to camera operators worldwide as I very much doubt I’m using these terms correctly.

  • Orbit rotates the camera around the rocket at a configurable distance
  • Dolly physically moves the camera away from and toward the subject
  • Pan freely rotates the camera around its own origin
  • Zoom changes the field of view to get a narrower or wider angle

Functions

Input

Add Components

This function is intended to fire once on initialisation, creating and storing the rest of the components the system requires. By default this is just your standard Camera and Spring Arm Components.

Add Camera Input

Calculates Camera Input for the current frame. This value is clamped to make sure we can’t spin the camera at the speed of light.

Add Increment Input

Allows for sending incremental input to the camera rig. The most common use case for this feature is dollying/zooming the camera by a discrete amount on button press/mouse scroll.

Add Primary/Secondary Mode Input

The Primary and Secondary Inputs determine the current Camera Mode. In BP_DemoCharacter these are mapped to the left and right mouse button respectively.

InputMode
Primary InputOrbit
Secondary InputPan
Primary + Secondary InputDolly
Secondary + Primary InputZoom
Process Input Lag

Slowly interpolates Camera Input (which is the combined total of the current user input plus residual camera motion from the previous frame) down to zero based on the Camera Mode. This allows us to set different lag settings for each mode.

Camera Control

Update Zoom/Dolly Distance Target

Adds a delta value to either the Zoom or Dolly target, to which the camera rig will interpolate over time.

Interpolate Camera Parameters

Interpolates the Camera Component’s Field of View and the Spring Arm’s Target Arm Length based on their distance targets. These changes may happen concurrently during the transition between Camera Modes.

Center Camera

An optional feature for resetting the Camera Component back to its default orientation and Field of View. In BP_DemoCharacter this will happen after a short delay when no input is detected.

Update/Rotate Components

These functions use the current Camera Mode to determine which Components should rotate (and by how much) and then makes those updates to the relevant transforms.

Settings

Input

NameDescription
Camera ModeThe currently active camera mode
Camera InputThe cumulative camera input value
Camera Input ScaleA multiplier applied to incoming camera input
Camera Input MaxMaximum camera input
Camera Input Rotation LagHow much we smooth out the motion of the camera rotation. The lower the value, the more lag there will be. This is similar to the Spring Arm component’s ‘Camera Lag’ feature, which we’re not using because it’s a bit too limited for our purposes.
Camera Input Translation LagThe same as Camera Rotation Lag, but for Dolly and Zoom modes.

Orbit

NameDescription
Orbit SpeedHow fast the camera will orbit around your object
Orbit Pitch MinMinimum camera pitch while in Orbit mode
Orbit Pitch MaxMaximum camera pitch while in Orbit mode

Pan

NameDescription
Pan SpeedHow fast the camera will rotate while in Panning Mode
Pan Pitch MinMinimum camera pitch while in Panning mode
Pan Pitch MaxMaximum camera pitch while in Panning mode
bPan Return DelayIs the camera locked in place while we wait for the Panning Return Delay period to complete?
Pan Return DelayHow long the camera will pause before returning back to its usual position when no longer in Panning Mode
Pan Return SpeedHow fast the camera will return back to its original position when no longer in Panning Mode

Zoom

NameDescription
Zoom SpeedHow fast the camera’s field of view will interpolate to its target
Zoom Distance DefaultDefault field of view
Zoom Distance TargetThe target field of view to interpolate towards
Zoom Distance MinMinimum field of view
Zoom Distance MaxMaximum field of view
Zoom LagHow much input smoothing is applied while in Zoom Mode
Zoom IntervalHow much the camera will zoom in when incremented
Zoom Interval LagThe smoothing of the animation while zooming in increments
bZoom Return DelayIs the camera locked in place while we wait for the Zoom Return Delay period to complete?
Zoom Return DelayHow long the camera will pause before returning back to its usual position when no longer in Zooming Mode
Zoom Return SpeedHow fast the camera will return back to its original position when no longer in Zooming Mode

Dolly

NameDescription
Dolly SpeedThe speed at which the camera will move in Dolly Mode
Dolly Distance DefaultThe camera’s default distance from its parent
Dolly Distance TargetThe target spring arm distance to interpolate towards
Dolly Distance MinThe closest distance at which the player can push the camera in towards its parent
Dolly Distance MaxThe maximum distance the camera can be from its parent
Dolly LagHow much input smoothing is applied while in Dolly Mode
Dolly IntervalHow much the camera will dolly when incremented. This value is a percentage of the current Spring Arm length, getting incrementally larger the more you pull out.
Dolly Interval LagThe smoothing of the animation while dollying in increments

Frequently Asked Questions

Does this work for things other than spaceships?

Of course it does! I just couldn’t think of anything cooler than a rocket ship to demo the Orbit Camera’s features.

The Orbit Camera Component can be added to just about anything.

If your object of interest isn’t in outer space or underwater you might want to set your Orbit Min Pitch value to something closer to 0, or you might punch through the ground.

How can I make the camera collide with my scene?

Space is pretty empty so I didn’t bother with camera collision, but this is something the Spring Arm component can do by default. All you need to do is check the Do Collision Checks box and set the Probe Size to whatever is appropriate for your scene.

Now when the camera collides with something (or line of sight is broken) it will push in to avoid intersections.

I am a technical artist from Adelaide, Australia. I created techarthub to share my knowledge and love for this industry. I hope you feel it too!

Scroll to Top