https://github.com/vrlabs/contact-tracker
Tracks the position of a Contact Sender.
https://github.com/vrlabs/contact-tracker
Last synced: about 1 year ago
JSON representation
Tracks the position of a Contact Sender.
- Host: GitHub
- URL: https://github.com/vrlabs/contact-tracker
- Owner: VRLabs
- License: mit
- Created: 2022-03-10T23:49:10.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-21T12:58:20.000Z (about 2 years ago)
- Last Synced: 2024-04-23T21:26:01.591Z (about 2 years ago)
- Language: C#
- Homepage:
- Size: 31 MB
- Stars: 28
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Contact Tracker
[](https://github.com/VRLabs/Contact-Tracker/releases/latest)
[](https://github.com/VRLabs/Contact-Tracker/blob/main/LICENSE)
[](https://img.shields.io/badge/Quest-Compatible-green?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/)
System for attaching objects to contacts on other players

### ⬇️ [Download Latest Version](https://github.com/VRLabs/Contact-Tracker/releases/latest)
### 📦 [Add to VRChat Creator Companion](https://vrlabs.dev/packages?package=dev.vrlabs.contact-tracker)
---
## How it works
* Six overlapping Proximity Contacts feed their outputs into a parent constraint to center a GameObject on the target.
* The GameObject contains the Proximity Contacts, making them center themselves on the target constantly.
* The ``Allow Others`` setting on the Contacts is turned off after the Contact Tracker has attached.
* This prevents the Contact Tracker from tracking multiple Contacts.
## Install guide
https://github.com/VRLabs/Contact-Tracker/assets/76777936/39dd0fb1-9333-42d3-91b4-8c812a24792a
* Merge the Animator Controller ``Contact Tracker FX`` to your own FX Controller, using the [Avatars 3.0 Manager](https://github.com/VRLabs/Avatars-3.0-Manager) tool.
* Drag & drop the ``Contact Tracker`` 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 ``Tracker Target``.
* Move ``Tracker Target`` outside of ``Contact Tracker`` and place it anywhere in your avatar's hierarchy as needed.
> [!NOTE]
> When building for Quest, you will have to remove unsupported components and shaders
## How to use
* Place the objects you want to attach to other players inside ``Contact Tracker`` -> ``Container``.
* Alternatively you can constrain the objects to ``Contact Tracker`` -> ``Tracking Points``.
* Enable the ``ContactTracker/Control`` parameter to activate the system.
* You can edit the ``Collision Tags`` of the six Proximity Contacts to change which Contact Senders the Contact Tracker should track.
* The ``ContactTracker/Size`` parameter in the FX Controller can be changed to set the size of the Contact Tracker when it is not tracking.
## Additional notes
* The Blend Tree used in the ``Contact Tracker Blend Tree`` FX Layer **MUST** use Write Defaults **ON**!
* This is the only case in which mixing Write Defaults is okay, you do not need to switch your workflow.
## Performance stats
```c++
Constraints: 6
Constraint Depth: 5
Contact Receivers: 6
FX Animator Layers: 2
Mesh Renderers: 1
```
## Hierarchy layout
```html
Contact Tracker
|-Container
| |-Cube
|-Tracking Points
| |-Culling
| |-X+
| |-X-
| |-Y+
| |-Y-
| |-Z+
| |-Z-
|-Tracker Target
```
## Contributors
* [hfcRed](https://github.com/hfcRed)
* [Dreadrith](https://github.com/Dreadrith)
* [lin](https://github.com/oofdesu)
## License
Contact Tracker is available as-is under MIT. For more information see [LICENSE](https://github.com/VRLabs/Contact-Tracker/blob/main/LICENSE).
[
](https://vrlabs.dev "VRLabs")
[
](https://discord.vrlabs.dev/ "VRLabs")
[
](https://patreon.vrlabs.dev/ "VRLabs")
[
](https://twitter.com/vrlabsdev "VRLabs")