Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#183 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
28/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp, godot
Ambito
game-dev

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C++
Stelle
6.1k
Fork
337
Merge medio
1g 13h
PR unite (30g)
39

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Redot-Engine/redot-engine

Tutte le issue di Redot-Engine/redot-engine

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.