Little Elf - 2D parallax script (Unity c#)
Hello there ! Sharing a little script that I found and am using for my little project in Unity :
A script that allows to see the changes of parallax in the editor when using orthographic camera.
So when I started the project, I had to choose between 2 types of cameras : orthographic or perspective, both has it's con or pros, after trying both I finally opted for the former one. For this project it felt somehow better, mostly from a visual standpoint, I could have more control over the sprite sizes, I wanted to have pixel perfect sprites, and put them exactly where I want, well.. almost).
As I progressed I found I fatal flaw using the basic parallax script with orthographic camera, I couldn't put exactly sprites where I wanted, since as the character (camera) goes on the level, the background offset were larger and larger, and without being able to save while in runtime, I had to guess the parallax offset, and move them around with guess work. And here comes in the little script saviour, now I can move around the camera, and see all the background elements moving along with it, putting my assets exactly where I wanted !
Here is the link to the original post, with the script and details about how it works and the hows and whys they did it.
https://www.gamasutra.com/blogs/DavidDionPaquet/20140601/218766/Creating_a_paral...
Credit to David Dion-Paquet, I'm just resharing the awesome script that I found.
Have a nice day !
Files
Get Little Elf
Little Elf
Status | Released |
Author | cursedj07 |
Genre | Platformer |
Tags | 2D, Cute, Fantasy, Hand-drawn, Short, Unity |
More posts
- Little Elf is out !Mar 27, 2021
- Little Christmas alpha buildDec 25, 2020
Leave a comment
Log in with itch.io to leave a comment.