Skip to content

[Pinching gesture] Fix converting positions to the scene on a 3D layer (v1.2.2) - #2330

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

4ian merged 1 commit into
mainfrom
claude/awesome-knuth-vaoj1s-pinch-gesture

Conversation

@4ian

@4ian 4ian commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

"Transform X/Y to scene" (TransformToSceneX/Y) called 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). For example, the center of a pinch can't be converted to the scene in a 3D game.

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

Checked 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): "Transform X/Y to scene" of the screen center threw the error before the fix, and gives the same point as the layer conversion after it. verifyExtension passes.


Generated by Claude Code

…r (v1.2.2)

"Transform X/Y to scene" gave the coordinates only to
Layer.convertCoords, 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, 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 1370dd8 into main Oct 22, 2026
5 checks passed
@4ian
4ian deleted the claude/awesome-knuth-vaoj1s-pinch-gesture 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