Skip to content

[Marching Squares] Fix drawing only the screen on a 3D layer (v0.6.2) - #2331

Merged
4ian merged 1 commit into
mainfrom
claude/awesome-knuth-vaoj1s-marching-squares
Oct 22, 2026
Merged

4ian merged 1 commit into
mainfrom
claude/awesome-knuth-vaoj1s-marching-squares

Conversation

@4ian

@4ian 4ian commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

With "Must only draw what is on the screen", "Draw the field" finds the screen corners in the scene with layer.convertCoords(x, y). On a layer whose camera is rotated in 3D, this throws "Cannot set properties of undefined (setting '0')": convertCoords creates a point when none is given, but its 3D branch uses the missing one (4ian/GDevelop#9284 fixes it in GDevelop).

The extension now gives a point for the result to each of the 4 conversions (layer.convertCoords(x, y, 0, [0, 0])), which works with the released versions of GDevelop too.

Checked with the field object of the Qix example, drawing only the screen, in a game with a camera rotated in 3D (the 3D RTS with a map), with the current build of GDevelop (without 4ian/GDevelop#9284): drawing the field threw the error before the fix, and draws after it. verifyExtension passes.


Generated by Claude Code

With "Must only draw what is on the screen", "Draw the field" gave the
coordinates only to Layer.convertCoords to find the screen corners in the
scene, which throws "Cannot set properties of undefined" on a layer whose
camera is rotated in 3D (a bug of GDevelop, fixed in 4ian/GDevelop#9284).
A point for the result is given to each conversion, so it works with the
released versions of GDevelop too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj
@4ian
4ian requested a review from a team as a code owner October 22, 2026 17:38
@4ian
4ian merged commit 2986bf7 into main Oct 22, 2026
5 checks passed
@4ian
4ian deleted the claude/awesome-knuth-vaoj1s-marching-squares branch October 22, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants