godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.41k stars 21.26k forks source link

When Camera is enabled, the ParallaxLayer/Tilemap Physics Layer is calculated inaccurately using is_on_floor() #88752

Open wyattbiker opened 9 months ago

wyattbiker commented 9 months ago

Tested versions

v4.3.dev3.official [36e943b6b]

System information

Linux Kubuntu 23.04 KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.104.0 Qt Version: 5.15.8

Issue description

The is_floor() function reports incorrectly (or is off) when being applied to a ParallaxLayer Tilemap and a Player with Camera enabled. If camera is disabled, then is_floor() works correctly.

Steps to reproduce

Create a CharacterBody2D Player with a camera. Also create a ParallaxLayer and a TileMap floor with a physics layer collider. When the Player drops to the floor it will not stop at the floor but somewhere else depending on the ParalaxLayers position.

Project project

Camera Enabled TilemapCamEnabled

Camera Disabled TilemapCamDisabled

Minimal reproduction project (MRP)

Archive.zip

wyattbiker commented 8 months ago

@josesantoscorte You should read these guidelines. https://docs.godotengine.org/en/stable/contributing/workflow/index.html

josesantoscorte commented 8 months ago

Hi I'm new here and would like to work on this.