Orbit Camera | Technical Documentation

Thanks for your interest in the Orbit Camera, the first entry in my Starship series of projects 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.

Example
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

All of the logic for the Orbit Camera is contained within this Pawn, and you can drop it into your scene to immediately start fine-tuning its settings. The Blueprint comes with a very simple camera rig (mostly just a Spring Arm Component) and a demo rocket model adapted from one found in Epic’s Content Examples project.

The Pawn also comes with a dynamic SkySphere (well, SpaceSphere) that 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 Mode

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 rocket.
  • Pan freely rotates the camera around its own origin.
  • Zoom changes the field of view to get a narrower or wider angle

Functions

Add Camera Input

Calculates Camera Input for the current frame based on your aspect ratio. It also clamps this value to make sure we can’t spin the camera at the speed of light.

Update Camera 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.

Rotate Camera

Rotates the camera based on a 2D speed input. The Use Spring Arm boolean value determines whether or not this rotation happens at the camera’s origin or the actor’s.

Dolly Camera

Sets the desired Dolly Distance.

Zoom Camera

Sets the desired Zoom Distance.

Settings

Input

NameDescription
Camera Input MaxThe combined total of both current and previous Camera Input cannot exceed this value. Useful if we don’t want camera rotation speed to build up too much!
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 Input Rotation Lag but for the 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.
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 move.
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.
Zoom Distance DefaultDefault field of view.
Zoom Distance MinMinimum field of view.
Zoom Distance MaxMaximum field of view.
Zoom LagHow much input smoothing there is when in Zoom Mode.
Zoom IntervalHow much the camera will zoom in when the mouse wheel is scrolled.
Zoom Interval LagThe smoothing of the animation while using the mouse wheel to zoom the camera.

Dolly

NameDescription
Dolly SpeedThe speed at which the camera will move in Dolly Mode.
Dolly Distance DefaultThe camera’s default distance from the origin of the rocket.
Dolly Distance MinThe closest distance at which the player can push the camera in towards the rocket.
Dolly Distance MaxThe maximum distance the camera can be from the rocket. Also used to calculate the maximum size of the SpaceSphere.
Dolly LagHow much input smoothing there is when in Dolly Mode.
Dolly IntervalThe distance the camera will move when the mouse wheel is scrolled when in Orbit Mode. This value is a percentage of the current Spring Arm length, getting incrementally larger the more you pull out.
Dolly Interval LagMovement lag while using the mouse wheel to dolly the camera.

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.

Changing the object that the camera orbits around is as easy as swapping out the Static Mesh. You can add your own components in whatever configuration you wish, the Camera doesn’t need to communicate with any of them.

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