Camera, Scrolling & World
A camera that holds still, a world that moves past it, and the screen-edge maths everything else relies on.
The world is built from two actors: a camera that holds position and pans with the player, and a scrolling background that carries the entire level past it.
The camera director
Place one per level. It becomes the view target automatically and provides the screen-edge maths the rest of the kit uses for spawning and culling.
| Property | Default | Purpose |
|---|---|---|
| Follow Speed | 4 | How quickly the camera eases toward the player sideways. Lower is lazier and calmer. |
| Dead Zone Y | 150 | How far the player can move before the camera reacts at all. A dead zone stops small corrections from making the whole screen wobble. |
| Min / Max Camera Y | -800 / 800 | How far the camera may pan in each direction. |
| Screen Half Extent X | 1500 | Half the visible height in world units. Too small and enemies vanish while still on screen; too large and they linger just off it. |
| Screen Half Extent Y | 600 | Half the visible width in world units. |
| Shake Coalesce Window | 0.05 | Identical camera shakes fired within this window are merged into one, so a wave dying together doesn't stack into a screen-breaking jolt. |
Screen queries
Available in Blueprint, and what the kit's own culling uses.
| Function | Returns |
|---|---|
| Get Screen Top X / Get Screen Bottom X | The world position of each edge โ spawn enemies above the top, despawn below the bottom. |
| Is Above Screen / Is Below Screen | Whether a point is past an edge, with an optional margin. |
| Is Offscreen | Past any edge, using the half-extent values above. |
| Is Off View | An exact test that projects the point to the real viewport, correct for any camera with no tuning. This is what despawning uses, so an enemy is only removed once it has genuinely left view. |
| Get View Edge X | The world position of the top and bottom edges at a given height โ used to spawn sideways flyers where they will actually be seen. |
The scrolling background
Place exactly one per level and parent every piece of scenery under its
SceneRoot. A single tick moves the lot, and frustum culling handles what is drawn โ there
is no per-mesh overhead.
It also acts as the anchor for world effects. Explosions and impacts are attached to it automatically, so they travel with the ground instead of hanging in the air as the level moves past.
To spawn your own world-anchored effect from Blueprint, use Spawn World Effect under ShmupKit | Background. It falls back to a plain world-space spawn in a level with no scroller, so a static test map still gets its effects.
The scrolling component
What actually moves things. It is on the scrolling background, and can be added to any actor that should drift with the world independently.
| Property | Default | Purpose |
|---|---|---|
| Scroll Speed | 400 | Units per second. |
| Scroll Direction | -1,0,0 | Which way the world travels. |
| Pause During Boss | On | Hold still for a boss fight, so it happens on a held frame. |
| Resume After Boss | Off | Off keeps the world stopped after the kill, giving the stage-clear sequence a still frame. Turn it on for a mid-level boss the stage continues past. |
| Offscreen Distance | 1500 | How far past the origin before the owner counts as gone. |
| Destroy When Offscreen | On | Clean up once past that line. Off on the background itself. |
| Check Interval | 1.5 | Seconds between off-screen checks. This is cheap housekeeping, not something that needs to run every frame. |
| Function / Event | Purpose |
|---|---|
| Set Boss Paused | Pause or resume the scroll manually, for scripted moments. |
| Is Paused For Boss | Whether the scroll is currently held. |
| On Scrolled Offscreen | Fires when the owner passes the line โ use it to return a pooled actor or reposition a tile. |
Rendering options
| Setting | Default | Purpose |
|---|---|---|
| Cast Mesh Shadows | Off | In Project Settings โ Game โ ShmupKit. Applied to every primitive on everything the kit spawns. Off strips shadows across the board; on merely stops the kit touching them, so a deliberately shadow-casting Blueprint survives. |
Blob shadow decals are the intended replacement โ see The Player Ship.
Building a level's world
Place the two actors
One SKCameraDirector and one BP_ScrollingBackground. Set the camera's
half extents to match what is actually visible, or spawning and culling will be slightly wrong
everywhere.
Build the terrain under SceneRoot
Add your islands and scenery as child components of the background's SceneRoot,
spaced along the scroll axis. Their spacing is the level's pacing.
Set the scroll
Set Scroll Speed on the background's scrolling component. This is the speed the whole level moves at, and the speed all world effects inherit.
Common fixes
- Enemies pop in or vanish while visible โ the camera's Screen Half Extents don't match the real view
- Explosions slide forward as the level scrolls โ the Niagara emitter needs Local Space ticked
- The camera jitters โ Dead Zone Y is too small
- Scenery doesn't move โ it isn't parented under SceneRoot
- Screen shake is overwhelming on big waves โ raise Shake Coalesce Window