Kinematic character controller dips and can eventually fall through moving vertical platform
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, rust, wasm
- 領域
- game-dev
調査の方向性
リンクされた例を使って問題を再現し、その後、src/plugins/KinematicCharacterController.ts の 263 行目付近と physics/physics.game.ts の 239 行目付近を読みます。JavaScript の挙動を Rust の character-controller 実装および kinematicPositionBased のプラットフォーム移動と比較します。コントローラーが上下に移動するプラットフォーム上に留まり、跳ねたり、沈み込んだり、すり抜けて落下したりしなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
When standing on top of a vertically moving platform, the kinematic character controller doesn't stay stuck to the platform. Instead it kind of bounces and dips into the platform. This can be observed here:
https://user-images.githubusercontent.com/1753624/236084741-bbf633cd-cd61-4202-87a2-c1cead4f2598.mp4
If you constantly move while standing on top of the platform, this bouncing effect is canceled out:
https://user-images.githubusercontent.com/1753624/236084973-f924363a-abe3-4ea2-8682-06e5a0656e69.mp4
And sometimes you can fall through the platform entirely:
https://user-images.githubusercontent.com/1753624/236087175-46d4fdf2-5b14-49fa-adf9-dba2e10362cf.mp4
This example uses Rapier.js but I don't think this is specific to the WASM version.
Here's our character controller settings:
const characterController = physicsWorld.createCharacterController(0.1);
characterController.enableAutostep(0.7, 0.3, true);
characterController.enableSnapToGround(0.3);
characterController.setCharacterMass(100);
characterController.setApplyImpulsesToDynamicBodies(true);
characterController.setSlideEnabled(true);
And here you can see where we compute the character controller position:
https://github.com/matrix-org/thirdroom/blob/e4c1a24a21e6d7300c7dabc5055b93ed6847ac3a/src/plugins/KinematicCharacterController.ts#L263
The platform is a kinematic rigid body (RAPIER.RigidBodyDesc.kinematicPositionBased()) which is moved using: body.setNextKinematicTranslation(_v)
https://github.com/matrix-org/thirdroom/blob/e4c1a24a21e6d7300c7dabc5055b93ed6847ac3a/src/engine/physics/physics.game.ts#L239
Here's the example live, you'll need at least a guest account to view it:
https://deploy-preview-599--thirdroom.netlify.app/world/#websg-v1-dev:thirdroom.io
You can also see this live in another example using Rapier and react-three-fiber:
https://game-sandbox.vercel.app/
https://github.com/alexandernanberg/sandbox
https://user-images.githubusercontent.com/1753624/236088614-5f57bd75-1c4a-44c7-bdfb-c491ca79c48a.mp4
@NateTheGreatt and I have looked at the code in the Rust implementation of the character controller and tried tweaking things. However, we're not exactly sure where to look. We're happy to help fix the issue but could use some help figuring it out.
- 主要言語
- Rust
- スター
- 5.9k
- フォーク
- 410
- 平均マージ
- 3時間 59分
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dimforge/rapier のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Debug assertion in the incremental solver-contact graph when a ball rolls on a Voxels collider対応中かも @shtse8 が 25 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Typo in the docsオープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
dimforge/rapier の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
rust-bitcoin/rust-bitcoin#7089 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
area/tools bug session-analysis
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Python OpenTelemetrySectionConfig has no file_sinks再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
NVIDIA/NeMo-Relay#1514 ·
メンテナーはふだん 1 日以内に返信
-
prompting proposal tool triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
can1357/oh-my-pi#17041 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
nix-community/fenix#262 ·