Skip to content

minhhh/unity-parallax-2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unity-parallax-2d

Simple script for creating 2d parallax layer in Unity. This is modified from the script in this article

Usage

Just attach the ParallaxLayer script to the specific layer that you want to move relatively to the main camera. Then you can set speed in X and Y direction from 0 to 1. The farther the layer is, the higher the speed. So a layer at infinity will have speed of 1, while the closest layer will have speed of 0.

There's a TestScene for an example of how this work.

About

Script for creating 2d parallax layer in Unity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages