godotengine / godot-demo-projects

Demonstration and Template Projects
https://godotengine.org
MIT License
5.74k stars 1.59k forks source link

2D Navigation Demo Fails in Godot 4.0 #911

Closed earsmeardius closed 1 year ago

earsmeardius commented 1 year ago

Which demo project is affected: 2D Navigation Demo 3.5-9e68af3 when using Godot 4.0.

OS/device including version: Windows 10 version 22H2

Issue description: In navigation.gd, lines 62, 75, path.remove(0) should be path.remove_at(0)

In navigation.gd line 45, NavigationServer2D.region_set_navpoly(region, navigation_poly) should be NavigationServer2D.region_set_navigation_polygon(region, navigation_poly)

HTH.

smix8 commented 1 year ago

Please provide a link to that demo download cause the demo project name hints at this being an old pre Godot 3.5 version demo and not a demo made for Godot 4.0.

Especially the path.remove(0) part is very old pathfinding syntax. The newer 2D demo for Godot 4 uses the NavigationAgent2D.

Calinou commented 1 year ago

Closing due to lack of response. Please comment if you can still reproduce this bug on the latest Godot version.