@samyam
  @samyam
samyam | Parallax Effect in Unity Tutorial - Infinite Scrolling Background @samyam | Uploaded April 2022 | Updated October 2024, 5 hours ago.
In this video I'll show you how to create a Parallax 2D effect to mimic depth perspective in a 2d scene (orthographic camera).

ᐅGet the full Source Code Bundle to my Unity Tutorials 🤓
sam-yam.itch.io/samyam-full-source-code-to-all-videos

UNITY SPRING SALE! 👉 assetstore.unity.com/?aid=1101ljAbS 👈
Check out my other video where I go over some of the awesome assets on sale! youtu.be/mso25zPqdWs

📥 Get the Source Code 📥
patreon.com/posts/63585249

🤝 Support Me 🤝
Patreon: patreon.com/samyg
Donate: ko-fi.com/samyam

►🔗 Relevant Video Links 🔗
ᐅKenney Assets Background Elements
https://www.kenney.nl/assets/background-elements

►🔗 Assets Shown In Video 🔗
ᐅMAIN SALE 💸
assetstore.unity.com/?on_sale=true&rows=96&aid=1101ljAbS
ᐅCorgi Engine - 2D + 2.5D Platformer
assetstore.unity.com/packages/templates/systems/corgi-engine-2d-2-5d-platformer-26617
ᐅUltimate Character Controller
assetstore.unity.com/packages/tools/game-toolkits/ultimate-character-controller-99962
ᐅQuibli: Anime Shaders and Tools
assetstore.unity.com/packages/vfx/quibli-anime-shaders-and-tools-203178
ᐅAmplify Animation Pack
assetstore.unity.com/packages/3d/animations/amplify-animation-pack-207911
ᐅAtmospheric House (Modular)
assetstore.unity.com/packages/3d/environments/urban/atmospheric-house-modular-192712
ᐅSpace Graphics Toolkit
assetstore.unity.com/packages/tools/level-design/space-graphics-toolkit-4160
ᐅ2D+3D Infinite Runner Engine
assetstore.unity.com/packages/templates/systems/2d-3d-infinite-runner-engine-51328

ᐅFLASH DEALS ⚡
assetstore.unity.com/?flashdeals=true&aid=1101ljAbS
ᐅGrabbit - Editor Physics Transforms
assetstore.unity.com/packages/tools/utilities/grabbit-editor-physics-transforms-182328
ᐅPaint in 3D
assetstore.unity.com/packages/tools/painting/paint-in-3d-26286
ᐅPolygon Arsenal
assetstore.unity.com/packages/vfx/particles/polygon-arsenal-109286
ᐅClayxels
assetstore.unity.com/packages/tools/game-toolkits/clayxels-165312
ᐅBoing Kit: Dynamic Bouncy Bones, Grass, Water, and More
assetstore.unity.com/packages/tools/particles-effects/boing-kit-dynamic-bouncy-bones-grass-water-and-more-135594
ᐅLiving Particles
assetstore.unity.com/packages/vfx/particles/spells/living-particles-105817
ᐅHEROIC FANTASY CREATURES FULL PACK Volume 1
assetstore.unity.com/packages/3d/characters/creatures/heroic-fantasy-creatures-full-pack-volume-1-5730

In this video I'll show you how to create a Parallax 2D effect to mimic depth perspective in a 2d scene (orthographic camera). First we have to add in an image and make it the size of the screen, duplicate it 2 times, and put it to the side of the original image, so that the sprite can be around 3 times the screen size of the camera. These two extra sprites are made children of the main center sprite. This is for the looping. Then we write a script that moves the sprite in relation to the camera at a different speed. We loop the parallax effect by shifting the position of the sprite forwards if the camera starts to cut off the sprite render. We add in different layers to demonstrate the different environment movements, background, middleground, foreground, and repeat the process.

►⏱️ Timestamps ⏱️
0:00 Intro
0:43 Sponsorship
2:02 Sprite Layer Set up
7:11 Parallax Effect Script
11:32 Loop Parallax Effect
16:49 Add in Other Layers
19:41 Y Parallax Effect
22:19 Camera Move Script
22:41 Outro

💖💖THANK YOU TO ALL MY PATRONS 💖💖

❯❯❯ My Links ❮❮❮
💗 Patreon 💗
patreon.com/samyg
💬 Discord Server 💬
discord.gg/SwCKB3Q
🐦 Twitter 🐦
twitter.com/samyam_youtube
📚 Facebook 📚
facebook.com/samyam.youtube
👍 Like and Subscribe! 👍

🖥️ Computer Setup 🖥️
*As an Amazon Associate I earn from qualifying purchases.
amazon.com/shop/samyam

Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we have recommended. While clicking these links won't cost you any money, they will help me fund my development projects while recommending great assets!

#madewithunity #gamedev #unity
Parallax Effect in Unity Tutorial - Infinite Scrolling BackgroundDetecting Enemy Collisions - Unity TutorialSetting Up Unity Hub - How to make a game in Unity Pt. 1 #ShortsSwitching Action Maps in Unitys Input SystemHow to EASILY Build to an Android Phone in UnityLearn Unreal Engine 5 with me! Parkour System Live Stream #2I listened to the haters #indiegame #gamedevEASY and SMOOTH Camera Follow Unity TutorialDesign Pattern: Singletons in UnityCustom Cursor with Input System - Unity TutorialProximity Sound Design in Lethal CompanyHow to make RTS Cinemachine Camera with Pan and Zoom in Unity

Parallax Effect in Unity Tutorial - Infinite Scrolling Background @samyam

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER