Static Rapier boundary samples use local-space positions for `velocity_at_point`

オープン 初心者向け
#74 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust

調査の方向性

ColliderCouplingManager::update_boundaries から始めます。ここでは StaticSampling が boundary.positions を構築しますが、ローカルの rapier_pt を RigidBody::velocity_at_point に渡しています。すでにワールド空間の点を使用している DynamicContactSampling と比較してください。collider.position() * rapier_pt を適用し、共有実装を通して 2D と 3D の両方の経路を確認します。説明されている回帰を追加します。原点から離れた回転する物体で、各静的境界速度が body.velocity_at_point(boundary_position) と等しいことをアサートし、その後、既存の coupling テストを実行します。

索引モデルが issue の本文から書いたものです。

説明

In ColliderCouplingManager::update_boundaries, StaticSampling correctly transforms each local sample into world space for boundary.positions, but passes the untransformed rapier_pt to RigidBody::velocity_at_point.

Rapier expects a world-space point. Consequently, rotating bodies away from the origin produce incorrect boundary velocities proportional to their world translation. This can inject substantial energy into the fluid and rigid body.

DynamicContactSampling already uses its world-space projected point correctly.

A minimal regression would place a rotating body away from the origin and verify that each static boundary velocity equals body.velocity_at_point(boundary_position).

Suggested fix:

let velocity = body.map(|b| {
    b.velocity_at_point(collider.position() * rapier_pt)
});

This affects both the 2D and 3D integrations through the shared implementation.

Note: This report was drafted with AI assistance; the reproduction and proposed fix were verified against Salva 0.11 and current master.

主要言語
Rust
スター
717
フォーク
42
平均マージ
9分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dimforge/salva のほかの issue

dimforge/salva の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。