Giter Site home page Giter Site logo

pokeyi / vrc-player-tracking Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 0.0 111 KB

Local player body-part tracking for VRChat.

Home Page: https://pokeyi.dev

License: MIT License

C# 100.00%
vrchat vrchat-tool vrchat-udon vrchat-worlds vrchat-sdk3 vr unity

vrc-player-tracking's Introduction

๐Ÿ’พ VRC-Player-Tracking Downloads

Local player body-part tracking for VRChat.

Player Tracking

VRChat Creator Companion App (VCC)

This project can now be imported through VCC with the Pokeyi's Udon Tools VPM package.

Overview

๐Ÿšง This project is functional but in early stages with additional features planned. ๐Ÿšง

VRC Player Tracking is a single configurable UdonSharp behaviour that can be used to track specific player avatar body parts and bones as well as smoothly attach game objects to those positions.

It is intended to be efficient and relatively simple to use without the need for any additional editor scripts or dependencies outside of UdonSharp. All configuration can be done within the Unity Inspector window without the need for any programming, Udon, or SDK knowledge. That said, the source code is cleanly-organized and commented in the hopes of also being a good learning tool.

Requirements

Errors regarding functions not being exposed likely mean you need an updated version of the SDK or UdonSharp.

Recommended

Other useful VRChat world-creation tools that I will always recommend.

Setup

Make sure you have already imported the VRChat Worlds SDK and UdonSharp into your project.

  • Download the latest Unity Package and import it into your project.
  • A pre-configured example prefab is included that you can drop into your scene if you like.
  • Create and select an empty game object and add the P_PlayerTracking behaviour via the Unity Inspector window or 'Component > Pokeyi.VRChat > P.VRC Player Tracking' toolbar menu.
  • Click the 'Convert to UdonBehaviour' button if prompted.
  • Configure the rest of the behaviour's properties in the Inspector window as you see fit. Each of these is explained in detail further below.

Features

The main features of Player Tracking.

  • Use-Attachments Toggle - Toggle the use of attachments to tracked positions.
  • Attachment Positions - Assign which game objects will be attached to which positions.

All of the following properties have hover-tooltips in the Unity Inspector window.

Attachment Positions

The following avatar body parts and bones have attachment positions included in the behaviour. Any left blank will be safely ignored.

  • Origin - API Tracking Data - Center ground-level position.
  • Head - API Tracking Data - HUD elements can be attached here.
  • Left Hand - API Tracking Data - Hand-tracking data.
  • Right Hand - API Tracking Data - Hand-tracking data.
  • Left Foot - Bone Position
  • Right Foot - Bone Position
  • Left Lower Arm - Bone Position
  • Right Lower Arm - Bone Position
  • Left Upper Arm - Bone Position
  • Right Upper Arm - Bone Position
  • Left Lower Leg - Bone Position
  • Right Lower Leg - Bone Position
  • Left Upper Leg - Bone Position
  • Right Upper Leg - Bone Position
  • Chest - Bone Position

Use Case Examples

Attachments should follow movements smoothly without jittering or rubber-banding, though performance may vary by use case.

  • HUD elements attached to the Head position.
  • Colliders or triggers attached to the Hand positions for physical interactivity.
  • Hide invisible cubes named after your friends inside every part of your body. No one will ever see them, but you'll know.

Credit & Support

Please credit me as Pokeyi if you use my work. I would also love to see your creations that make use of it if you're inclined to share. This and related projects have involved many months of solid work and self-education as I strive for an opportunity to change careers and make a better life for myself. If you find value in my work, please consider supporting me, it would truly help a lot.

Patreon

PayPal

License

This work is licensed under the MIT License.

Copyright ยฉ 2021 Pokeyi - https://pokeyi.dev - [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

vrc-player-tracking's People

Contributors

pokeyi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.