godotengine / godotengine/godot

Moving Area2D detects CharacterBody2d but CollisionShapes have not overlapped yet

Open
#94,933 2 comments 2 reactions 0 assignees View on GitHub
bug confirmed topic:2d topic:physics
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducible in:
- v4.2.2.stable.official [15073afe3]
- v4.3.rc1.official [e343dbbcc]

### System information

Godot v4.2.2.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 32.0.15.6070) - AMD Ryzen 7 3700X 8-Core Processor (16 Threads)

### Issue description

When an Area2D node is moving it reports collisions with CharacterBody2D nodes that are in front of an area even though they have not overlapped yet. When turning on the visible collision shapes debug setting it is clearly visible that they are not overlapping. The same thing happens when an Area2D node is a child of another node that is moving.

### Steps to reproduce

Load the MRP, run the test scene. The blue squares are CharacterBody2D nodes and the red squares are Area2D nodes. All the nodes move with a constant speed. Note that the output shows that the CharacterBody2D nodes entered the Area2D nodes but this clearly has not happened.

### Minimal reproduction project (MRP)

[Area2DBug.zip](https://github.com/user-attachments/files/16420151/Area2DBug.zip)

Contributor guide

Open the contributing guide

Research direction

Start by opening the attached Area2DBug.zip and running its test scene with visible collision shapes enabled. Trace how moving Area2D and CharacterBody2D nodes report entry events, then verify that reported collisions occur only after the shapes overlap in the reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.