MatterJS bodies produce incorrect collisions with negative scale

オープン
#7,247 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
javascript
領域
game-dev

調査の方向性

まず、リンクされた CodeSandbox の再現を Phaser 3.90 で実行し、五角形の X スケールを反転する前後で衝突サポートを比較します。報告されたケースに関係する MatterJS の衝突処理を追跡します。負のスケールでもサポートが実際の衝突点に留まり、既存の正のスケールでの動作も引き続き機能すれば完了です。

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

説明

Version

  • Phaser Version: 3.90
  • Operating system: Windows
  • Browser: Chrome/Firefox

Description

When a MatterJS body has its scale set to -1, the detected collisions have supports that seem to always just clamp directly to the shape's vertices instead of where the collision occurred. This appears to be a bug with MatterJS as a whole, as I was able to reproduce it using exclusively MatterJS, but it appears MatterJS is pretty much unmaintained and Phaser has its own implementation of MatterJS built in anyways so I figured it would be better to open the issue here.

Example Test Code

https://codesandbox.io/p/sandbox/rsy4lz
Click to drop a rectangle on top of the pentagon; red dots will appear at the collision. Click the button at the top to invert the scale X of the pentagon to see the red dots will not appear at the collision anymore.

Additional Information

主要言語
JavaScript
スター
40.7k
フォーク
7.2k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

phaserjs/phaser のほかの issue

phaserjs/phaser の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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