Kinematic character controller dips and can eventually fall through moving vertical platform
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, rust, wasm
- Lĩnh vực
- game-dev
Hướng nghiên cứu
Tái hiện vấn đề bằng các ví dụ được liên kết, sau đó đọc src/plugins/KinematicCharacterController.ts quanh dòng 263 và physics/physics.game.ts quanh dòng 239. So sánh hành vi của JavaScript với phần triển khai character-controller bằng Rust và chuyển động nền tảng kinematicPositionBased. Công việc được xem là hoàn tất khi controller vẫn ở trên một nền tảng chuyển động theo chiều dọc mà không nảy lên, lún xuống hoặc rơi xuyên qua nền tảng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 6k
- Fork
- 429
- Merge trung bình
- 8 giờ 8 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dimforge/rapier
-
`Collider::set_active_collision_types` sets no change flag: widening a collider's types after creation never creates the pairCó thể đã có người làm @RoboX2020 đã nhận 6 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Debug assertion in the incremental solver-contact graph when a ball rolls on a Voxels colliderCó thể đã có người làm @shtse8 đã nhận 35 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Typo in the docsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 48/100
dimforge/rapier#1053 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của dimforge/rapier
Issue tương tự
-
github_actions security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
dekobon/big-code-analysis#1815 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: png-glitch bug P0 security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
chikoski/png-glitch#45 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
nekko-labs/nekko-agent#1756 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
upstream
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
yologdev/yoyo-evolve#1138 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
gitbutlerapp/gitbutler#16982 ·
Maintainer thường phản hồi trong vòng 1 ngày