Giter Site home page Giter Site logo

vrchat_usermovingfloor's Introduction

UserMovingFloor

VRChat用乗り物床面追従システム

香川急行電鉄饂飩線ワールド的なシステムの汎用化です。 動く床面に乗ったプレイヤーが特別なアクション無しに床に追従します。

  • あるオブジェクトの移動にプレイヤーを追従させるシステムです。
  • 領域内から出た場合に領域内におしこめるか「下車」させるか選択可能です。
  • 鉄道やバスなど乗客が移動出来る床面が存在し緩やかに発停車する乗り物に適しています。
  • 追従中の移動では歩行モーション等が再生されません。この点の解決法を知っている人があればご教授下さい。

インストール

UdonSharp v1.0環境(VCC)

以下の前提リソースを事前にセットアップ・インポートして下さい

UserMovingFloor >= v3 ダウンロード

UdonSharp v0.x環境(従来SDK)

以下の前提リソースを事前にインポートして下さい

UserMovingFloor <= v2 ダウンロード

使い方

  1. あらかじめ CyanPlayerObjectPool 等依存アセットをインポートしておいて下さい。
  2. 乗り物のオブジェクトにUser Moving Floor Targetを付けます。
    • Ride Colliders:(任意)乗り物が停止しているときに有効な床面などのコライダー。乗車中に干渉しないようOFFになります。
    • Inside Collider: (必須)乗り物の内部に居る判定用コライダー。IsTriggerを有効にしてください。
    • Can Get Off While Moving: (任意)乗り物が走行中にInside Collider範囲外に出たときに下車扱いにするならtrue。
    • Moving: (必須)乗り物が走行中ならばtrue。スクリプト等で動的に動かす際にここを制御して下さい。
    • User Moving Floor Targetと同じInsideCollider, CanGetOffWhileMoving, Moving, _OnGetOn, _OnGetOffのインターフェースを持った任意のUdonBehaviorを代わりに設定しても良いです。
  3. UserMovingFloor.prefabをシーンに置きます。
  4. PlayerObjectPoolオブジェクトが作成されるので、Pool Sizeを(ワールドの人数上限*2+2)にしてください。
  5. UserMovingFloorのTargetsにUser Moving Floor Targetが付いた乗り物のオブジェクトを設定します。

乗り物のオブジェクトの中に椅子を置く場合

  1. InsideUserMovingFloorVRCChair.prefabを乗り物に置いて下さい。
  2. UserMovingFloorのInside Chairsに上記で置いた中のVRCChair3オブジェクト(InsideVRCStationCompanionが付いている)を設定して下さい。
  • 既知の問題: 椅子に先に座っている人がいる場合もInteractできてしまいます。

プルリクエスト歓迎!

雑に投げて下さい。反応がなければTwitterでつついて下さい。是非よりよい乗車システムを作ってゆきましょう。

ライセンス

Zlib License

Zlibライセンスなので普通に使う場合は表記も全く必要ないんですが、VRChatのワールドに使う場合は書いておくと良い乗り物ワールドが増える気がするので書いておくのオススメ。

vrchat_usermovingfloor's People

Contributors

narazaka avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

vrchat_usermovingfloor's Issues

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.