Skip to content

fix(forum-55465): Area2D.transformPoint not accounting for clientScale, add inverseTransformPoint - #2350

Open
guozhaokui wants to merge 1 commit into
layabox:Master3.0from
guozhaokui:bot/forum-55465-main
Open

fix(forum-55465): Area2D.transformPoint not accounting for clientScale, add inverseTransformPoint#2350
guozhaokui wants to merge 1 commit into
layabox:Master3.0from
guozhaokui:bot/forum-55465-main

Conversation

@guozhaokui

Copy link
Copy Markdown
Member

…e, add inverseTransformPoint

In mini-game environments (e.g. Douyin) where stage.clientScaleX/Y != 1,
transformPoint produced incorrect results because it used raw stage coordinates
directly against canvas-pixel-space halfWidth/halfHeight without scaling.

Also added inverseTransformPoint method to convert Area2D internal coordinates
back to screen coordinates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant