reckfellENGINE

ParallaxBackground

A node used to create a parallax scrolling background.

On this page
class ParallaxBackgroundReckfellSharpInherits CanvasLayer

A node used to create a parallax scrolling background.

A ParallaxBackground uses one or more ParallaxLayer child nodes to create a parallax effect. Each ParallaxLayer can move at a different speed using ParallaxLayer.MotionOffset. This creates an illusion of depth in a 2D game. If not used with a Camera2D, you must manually calculate the ParallaxBackground.ScrollOffset. Note: Each ParallaxBackground is drawn on one specific Viewport and cannot be shared between multiple Viewports, see CanvasLayer.CustomViewport. When using multiple Viewports, for example in a split-screen game, you need create an individual ParallaxBackground for each Viewport you want it to be drawn on.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

ParallaxBackgroundConstructor
# ParallaxBackground
C#
public ParallaxBackground();

Properties6

ScrollBaseOffsetProperty
# ScrollBaseOffset
C#
public Vector2 ScrollBaseOffset { get; set; }

The base position offset for all ParallaxLayer children.

ScrollBaseScaleProperty
# ScrollBaseScale
C#
public Vector2 ScrollBaseScale { get; set; }

The base motion scale for all ParallaxLayer children.

ScrollIgnoreCameraZoomProperty
# ScrollIgnoreCameraZoom
C#
public bool ScrollIgnoreCameraZoom { get; set; }

If true, elements in ParallaxLayer child aren't affected by the zoom level of the camera.

ScrollLimitBeginProperty
# ScrollLimitBegin
C#
public Vector2 ScrollLimitBegin { get; set; }

Top-left limits for scrolling to begin. If the camera is outside of this limit, the background will stop scrolling. Must be lower than ParallaxBackground.ScrollLimitEnd to work.

ScrollLimitEndProperty
# ScrollLimitEnd
C#
public Vector2 ScrollLimitEnd { get; set; }

Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than ParallaxBackground.ScrollLimitBegin to work.

ScrollOffsetProperty
# ScrollOffset
C#
public Vector2 ScrollOffset { get; set; }

The ParallaxBackground's scroll value. Calculated automatically when using a Camera2D, but can be used to manually manage scrolling when no camera is present.

Methods12

GetLimitBeginVector2
# GetLimitBegin
C#
public Vector2 GetLimitBegin();
Returns Vector2
GetLimitEndVector2
# GetLimitEnd
C#
public Vector2 GetLimitEnd();
Returns Vector2
GetScrollBaseOffsetVector2
# GetScrollBaseOffset
C#
public Vector2 GetScrollBaseOffset();
Returns Vector2
GetScrollBaseScaleVector2
# GetScrollBaseScale
C#
public Vector2 GetScrollBaseScale();
Returns Vector2
GetScrollOffsetVector2
# GetScrollOffset
C#
public Vector2 GetScrollOffset();
Returns Vector2
IsIgnoreCameraZoombool
# IsIgnoreCameraZoom
C#
public bool IsIgnoreCameraZoom();
Returns bool
SetIgnoreCameraZoomvoid
# SetIgnoreCameraZoom
C#
public void SetIgnoreCameraZoom(bool ignore);
Parameters
NameTypeDefault
ignorebool—
SetLimitBeginvoid
# SetLimitBegin
C#
public void SetLimitBegin(Vector2 offset);
Parameters
NameTypeDefault
offsetVector2—
SetLimitEndvoid
# SetLimitEnd
C#
public void SetLimitEnd(Vector2 offset);
Parameters
NameTypeDefault
offsetVector2—
SetScrollBaseOffsetvoid
# SetScrollBaseOffset
C#
public void SetScrollBaseOffset(Vector2 offset);
Parameters
NameTypeDefault
offsetVector2—
SetScrollBaseScalevoid
# SetScrollBaseScale
C#
public void SetScrollBaseScale(Vector2 scale);
Parameters
NameTypeDefault
scaleVector2—
SetScrollOffsetvoid
# SetScrollOffset
C#
public void SetScrollOffset(Vector2 offset);
Parameters
NameTypeDefault
offsetVector2—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.