Skip to content

A Unity script that creates a 2D parallax effect for 2D game objects based on mouse movement. This script allows you to toggle movement on the X and Y axes and supports customizable parallax strength and smoothing speeds.

License

Notifications You must be signed in to change notification settings

L1am-cd/Unity-2D-Parallax-Mouse-Movement

Repository files navigation

Banner

2D Object Parallax

A very simple script that allows you to add a parallax effect to your 2D objects.

Game Example

This script allows you to:

  • Set the parallax strength
  • Set separate smoothing speeds for touch and mouse inputs
  • Toggle the movement on the X and Y axes
  • Set a maximum X and Y offset

Use

  1. Add the Script to your 2D Object
  2. Change the settings to fit your needs

That's all!

Examples

Mouse

Mouse Example

Touch

Touch Example

About

A Unity script that creates a 2D parallax effect for 2D game objects based on mouse movement. This script allows you to toggle movement on the X and Y axes and supports customizable parallax strength and smoothing speeds.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages