Skip to content

Commit

Permalink
Updated version
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanMurzak committed Mar 16, 2023
1 parent 11bc768 commit 714437c
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 21 deletions.
60 changes: 60 additions & 0 deletions Assets/_PackageRoot/Documentation~/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 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)

<details>
<summary>Full demo video</summary>

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

</details>


# 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 <code>/Packages/manifest.json</code>
```json
{
"dependencies": {
"extensions.unity.mouse.parallax": "1.0.3",
},
"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
25 changes: 8 additions & 17 deletions Assets/_PackageRoot/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Unity-Mouse-Parallax
![npm](https://img.shields.io/npm/v/extensions.unity.mouse.parallax) ![License](https://img.shields.io/github/license/IvanMurzak/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).

Expand All @@ -24,46 +24,37 @@ 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 --registry https://registry.npmjs.org add extensions.unity.mouse.parallax`
- `openupm add extensions.unity.mouse.parallax`

# How to install - Option 2
- Add this code to <code>/Packages/manifest.json</code>
```json
{
"dependencies": {
"extensions.unity.mouse.parallax": "1.0.0",
"extensions.unity.mouse.parallax": "1.0.3",
},
"scopedRegistries": [
{
"name": "Unity Extensions",
"url": "https://registry.npmjs.org",
"scopes": [
"extensions.unity"
]
},
{
"name": "NPM",
"url": "https://registry.npmjs.org",
"name": "package.openupm.com",
"url": "https://package.openupm.com",
"scopes": [
"com.cysharp",
"com.neuecc"
"extensions.unity",
"com.cysharp"
]
}
]
}
```

# How to use
- add needed `Mouse...` component to any GameObject
- add needed `Mouse...2D` component to any GameObject
- link Targets to list of targets
- press 'Play' button in Unity Editor
7 changes: 5 additions & 2 deletions Assets/_PackageRoot/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "extensions.unity.mouse.parallax",
"displayName": "Unity Mouse Parallax",
"author": { "name": "Ivan Murzak", "url": "https://github.com/IvanMurzak" },
"version": "1.0.3",
"author": {
"name": "Ivan Murzak",
"url": "https://github.com/IvanMurzak"
},
"version": "1.0.4",
"unity": "2019.2",
"description": "Unity Parallax based on mouse input.",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"com.cysharp.unitask": "2.2.5",
"com.cysharp.unitask": "2.3.3",
"com.unity.collab-proxy": "1.15.18",
"com.unity.ide.rider": "2.0.7",
"com.unity.ide.visualstudio": "2.0.16",
Expand Down
2 changes: 1 addition & 1 deletion Packages/packages-lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"com.cysharp.unitask": {
"version": "2.2.5",
"version": "2.3.3",
"depth": 0,
"source": "registry",
"dependencies": {},
Expand Down

0 comments on commit 714437c

Please sign in to comment.