[Godot] Area3D's with ConcavePolygonShape3D shapes causes unintentional emission of "body_entered" signal when body exiting area

オープン
#183 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
28/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp, godot
領域
game-dev

調査の方向性

This is a 3D physics/area-signal bug in the engine (Area3D + ConcavePolygonShape3D / trimesh), with an MRP zip and a linked Godot issue. Start from how Area3D emits body_entered versus body_exited for concave shapes, and compare convex vs trimesh collision paths. Done means the extra body_entered on exit no longer fires in the MRP without breaking other area signals. This is engine-core work, not a first-timer patch.

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

説明

4.3 bug topic:physics tracked:godot
Tested versions

Reproduced in Godot 4.3 stable
Known Issue in Godot 4.x
https://github.com/godotengine/godot/issues/80633

System information

Windows 10, Godot 4.3 stable

Issue description

It seems like an Area3D with a collision shape of a ConcavePolygonShape3D emits it's body_entered signal when a body exits it. This issue was tested with a prism shape and also a basic cube shape. See below for more specifics.

Steps to reproduce

Scene structure:
2

As you can see the Area3D node's CollisionShape3D has a ConcavePolygonShape3D.
The ConcavePolygonShape3D was created from a MeshInstance3D PrismMesh shape.

The ConcavePolygonShape3D shape was created in these steps:

  1. Mesh (top button next to Transform and View)
  2. Create Collision Shape
  3. Collision Shape Placement: Static Body Child, Collision Shape Type: Trimesh
  4. Create
  5. Drag the newly formed CollisionShape3D under the Area3D node (the CollisionShape3D in the picture is this one)
    No other settings were altered on CollisionShape3D or the ConcavePolygonShape3D.

Script of the Area3D:

extends Area3D

func _ready() -> void:
	body_entered.connect(_on_body_entered)

func _on_body_entered(body: Node3D) -> void:
	print(self)

The script's function is to print itself once when body_entered gets emitted.

In additon, no other signal is connected to the Area3D.
5

Result of entering the Area3D in-game:
3
As you can see, it printed once.

Result of exiting the Area3D in-game:
4
It appears to emit the body_entered signal after the player leaves the area.

Minimal reproduction project (MRP)

project.zip

主要言語
C++
スター
6.1k
フォーク
337
平均マージ
3日 6時間
マージ済み PR(30日)
48

環境構築

はじめの一歩

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

Redot-Engine/redot-engine のほかの issue

Redot-Engine/redot-engine の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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