Repository navigation
[Marching Squares] Fix drawing only the screen on a 3D layer (v0.6.2) - #2331
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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')":convertCoordscreates 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.
verifyExtensionpasses.Generated by Claude Code