https://github.com/vrlabs/weapon-slash
Perform consecutive slashes with motion.
https://github.com/vrlabs/weapon-slash
Last synced: about 1 year ago
JSON representation
Perform consecutive slashes with motion.
- Host: GitHub
- URL: https://github.com/vrlabs/weapon-slash
- Owner: VRLabs
- License: mit
- Created: 2021-12-21T12:55:45.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-04T20:41:46.000Z (over 1 year ago)
- Last Synced: 2024-12-04T21:34:34.658Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 53.6 MB
- Stars: 19
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Weapon Slash
[](https://github.com/VRLabs/Weapon-Slash/releases/latest)
[](https://github.com/VRLabs/Weapon-Slash/blob/main/LICENSE)
[](https://img.shields.io/badge/Quest-Partial%20Compatible-yellow?logo=Meta)
[](https://unity.com/releases/editor/whats-new/2022.3.22)
[](https://vrchat.com/home/download)
[](https://discord.vrlabs.dev/)
[](https://patreon.vrlabs.dev/)
A movement based weapon effect trigger system

### β¬οΈ [Download Latest Version](https://github.com/VRLabs/Weapon-Slash/releases/latest)
### π¦ [Add to VRChat Creator Companion](https://vrlabs.dev/packages?package=dev.vrlabs.weapon-slash)
---
## How it works
* A polar-limited [PhysBone](https://docs.vrchat.com/docs/physbones) creates an offset for a [Contact](https://docs.vrchat.com/docs/contacts) system to play animations when a slashing motion is done with your arm.
* A networking layer animates a separate PhysBone hierarchy to account for [IK](https://en.wikipedia.org/wiki/Inverse_kinematics) smoothing.
## Install guide
https://github.com/VRLabs/Weapon-Slash/assets/76777936/129c37e9-101d-4a30-854e-00c03a01016c
* Download and import [Cancerspace shader](https://github.com/AkaiMage/VRC-Cancerspace).
* Merge the Animator Controller ``Weapon Slash FX`` to your own FX Controller, using the [Avatars 3.0 Manager](https://github.com/VRLabs/Avatars-3.0-Manager) tool.
* Merge the Expression Parameter List ``Weapon Slash Parameters`` to your own Expression Parameter List, using the [Avatars 3.0 Manager](https://github.com/VRLabs/Avatars-3.0-Manager) tool.
* Drag & drop the ``Weapon Slash`` prefab into the base of your Hierarchy.
* Right click and unpack the prefab, then drag & drop it onto your avatar.
* Expand the prefab hierarchy and find ``Weapon Slash`` -> ``Weapon``
* Move ``Weapon`` outside of ``Weapon Slash`` and place it on the left or right wrist of your avatar.
* Adjust the position and rotation of ``Weapon`` to fit into your hand.
* You can replace ``Weapon`` -> ``γγ₯γΌγγ½γΌγ`` with your own prop. Keep your prop in the same placement and facing the same way as the default prop.
> [!NOTE]
> When building for Quest, you will have to remove unsupported components and shaders. The particle systems provided in the package rely on shaders not supported by VRChat, so you will have to create your own effects.
## How to use
* ``WeaponSlash/Control`` parameter must be True for the system to be active.
* ``WeaponSlash/HeavyActive`` parameter must be True for the Heavy Slash to be enabled.
* Under the ``Weapon Slash/Effects/(Light or Heavy) Slash`` hierarchy are Containers. Place custom effects within these Containers. ``Weapon/(Light or Heavy) Effect Target`` is where these effects will appear.
* You can edit ``Weapon Slash/Dynamics/PhysBone`` to change the force required for the slash. For further adjustment you can also change the radius of ``Weapon Slash/Dynamics/Receiver``.
## Performance stats
System:
```c++
Constraints: 12
Constraint Depth: 5
Contact Receivers: 2
Contact Senders: 2
FX Animator Layers: 4
Parameter Memory: 3
Phys Bones: 2
```
Default Weapon:
```c++
Material slots: 2
Mesh Renderers: 2
```
Default Effects:
```c++
Audio Sources: 7
Particle Systems: 11
```
## Hierarchy layout
```html
Weapon Slash
|-Dynamics
| |-PhysBone
| |-Receiver
| |-Remote
| | |-PhysBone
| | |-Receiver
|-Effects
| |-Light Slash
| | |-A
| | | |-Container
| | | | |-Particle System
| | | | |-Audio
| | |-B
| | | |-Container
| | | | |-Particle System
| | | | |-Audio
| | |-C
| | | |-Container
| | | | |-Particle System
| | | | |-Audio
| |-Heavy Slash
| | |-Weak
| | | |-A
| | | | |-Container
| | | | | |-Particle System
| | | | | | |-Particle System
| | | | | |-Audio
| | | |-B
| | | | |-Container
| | | | | |-Particle System
| | | | | | |-Particle System
| | | | | |-Audio
| | | |-C
| | | | |-Container
| | | | | |-Particle System
| | | | | | |-Particle System
| | | | | |-Audio
| | |-Strong
| | | |-Container
| | | | |-Particle System
| | | | | |-Particle System
| | | | |-Audio
|-Weapon
| |-γγ₯γΌγγ½γΌγ
| | |-Blade
| | |-Hilt
| |-Light Effect Target
| |-Heavy Effect Target
```
## Contributors
* [lin](https://github.com/oofdesu)
## License
Weapon Slash is available as-is under MIT. For more information see [LICENSE](https://github.com/VRLabs/Weapon-Slash/blob/main/LICENSE).
β
[
](https://vrlabs.dev "VRLabs")
[
](https://discord.vrlabs.dev/ "VRLabs")
[
](https://patreon.vrlabs.dev/ "VRLabs")
[
](https://twitter.com/vrlabsdev "VRLabs")