Giter Site home page Giter Site logo

smart-floor-collider's Introduction

Smart Floor Collider

Static Badge Generic badge

Based on World Constraint.

It uses VRCFury for fast installation.

How to install it on your avatar

  1. Install the latest package
  2. Install VRCFury
  3. Drag and drop "Smart Floor Collider" onto the root of your avatar.

Note

You must remove or move the old floor collider to the "collider" game object under the World Constraint. (If you are reparenting your floor collider under the collider game object, remove the physbone collider component from "collider".

  1. VRFury should handle the rest. Click upload, and you are done.

How it works (locally) outdated for now

This works nearly identical to how world constraints normally work with a key few changes for this to work for this.

The first change is that the "World Constraint" only locks on the Y axis. Changing the Freeze Position Axis to only lock the Y axis allows the root parent constraint to follow us still around when it's holding an object in place.

As a result, when you turn off the child "Container" parent constraint, the object will stay in line with the avatar center but freeze in its last Y-axis position.

For the FX Controller, to detect whether the user is on the ground, we use the Global Parameter "Grounded," when the user is not grounded, the "Container" parent constraint is disabled which causes the floor collider to instantly stop moving as soon as VRChat detects the local client is not on the ground. As soon as the avatar returns to the ground with Grounded = True, the "Container" parent constraint is enabled again.

There is also a detection of whether the local client falls with VelocityY. An issue with freezing the floor collider in place is being able to fall through it. The falling state aims to detect when the user is not Grounded and if VelocityY is less than -2. This turns off the floor collider.

How it works (remotely)

//todo

smart-floor-collider's People

Contributors

zexxx avatar

Stargazers

Valérianne avatar

Watchers

 avatar

smart-floor-collider's Issues

Rotating Causes Collider to Jitter on Y-Axis on Remote Client

For reasons I'm currently not able to investigate right now. Rotating the player object causes the Collider game object to experience drifting on the Y-Axis. This results from the delayed loop and some constraint behavior or incorrect understanding.

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.