Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ivanmurzak/unity-mouse-parallax

Unity Parallax based on mouse position.
https://github.com/ivanmurzak/unity-mouse-parallax

package unity unity-plugin unity2d unity3d unity3d-plugin unitypackage unityplugin

Last synced: 5 days ago
JSON representation

Unity Parallax based on mouse position.

Awesome Lists containing this project

README

        

# Unity-Mouse-Parallax
![npm](https://img.shields.io/npm/v/extensions.unity.mouse.parallax) [![openupm](https://img.shields.io/npm/v/extensions.unity.mouse.parallax?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/extensions.unity.mouse.parallax/) ![License](https://img.shields.io/github/license/IvanMurzak/Unity-Mouse-Parallax) [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)

Unity Parallax based on mouse input. Alternative version to [Unity-Gyroscope-Parallax](https://github.com/IvanMurzak/Unity-Gyroscope-Parallax).

### Features
- ✔️ support legacy Input System
- ✔️ support new Input System
- ✔️ move/rotate objects based on mouse input
- ✔️ ability to add custom controllers

![Short Demo](https://user-images.githubusercontent.com/9135028/198884624-d8dacd24-41db-4488-b33c-59102809c336.gif)

Full demo video

https://user-images.githubusercontent.com/9135028/198884331-8e084cda-77bb-427a-bb6a-7d6af585b26f.mp4

# MouseMover2D
Moves list of objects using mouse input.

![Unity_2OiBF8IwNI](https://user-images.githubusercontent.com/9135028/198884833-761cd597-f749-4d02-8742-7fdf46c6144c.png)

# MouseRotator2D
Rotates list of objects using mouse input.

![Unity_uWbnrUEaR2](https://user-images.githubusercontent.com/9135028/198884825-d3b2872e-5331-4519-afe6-9061b80ebd8c.png)

# How to install - Option 1 (RECOMMENDED)
- [Install OpenUPM-CLI](https://github.com/openupm/openupm-cli#installation)
- Open command line in Unity project folder
- `openupm add extensions.unity.mouse.parallax`

# How to install - Option 2
- Add this code to /Packages/manifest.json
```json
{
"dependencies": {
"extensions.unity.mouse.parallax": "1.0.4",
},
"scopedRegistries": [
{
"name": "package.openupm.com",
"url": "https://package.openupm.com",
"scopes": [
"extensions.unity",
"com.cysharp"
]
}
]
}
```

# How to use
- add needed `Mouse...2D` component to any GameObject
- link Targets to list of targets
- press 'Play' button in Unity Editor