Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Camera component error comments #18367

Open
wants to merge 1 commit into
base: v3.8.6
Choose a base branch
from

Conversation

smallmain
Copy link

@smallmain smallmain commented Feb 24, 2025

Screen space coordinates are not origin-based at the top-left corner, but at the bottom-left corner.

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

@smallmain smallmain marked this pull request as ready for review February 24, 2025 03:50
Copy link

Code Size Check Report

Wechat (WASM) Before After Diff
2D Empty (legacy pipeline) 1001794 bytes 1001794 bytes ✅ 0 bytes
2D All (legacy pipeline) 2408779 bytes 2408779 bytes ✅ 0 bytes
2D All (new pipeline) 2498268 bytes 2498268 bytes ✅ 0 bytes
(2D + 3D) All 5380494 bytes 5380494 bytes ✅ 0 bytes
Web (WASM + ASMJS) Before After Diff
(2D + 3D) All 16603945 bytes 16603945 bytes ✅ 0 bytes

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -27199,27 +27199,27 @@
         onEnable(): void;
         onDisable(): void;
         onDestroy(): void;
         /**
-         * @en Convert a screen space (left-top origin) point to a ray.
-         * @zh 将一个屏幕空间(左上角为原点)坐标转换为射线。
+         * @en Convert a screen space (left-bottom origin) point to a ray.
+         * @zh 将一个屏幕空间(左下角为原点)坐标转换为射线。
          * @param x The x axis position on screen.
          * @param y The y axis position on screen.
          * @param out The output ray object.
          * @returns Return the output ray object.
          */
         screenPointToRay(x: number, y: number, out?: geometry.Ray): geometry.Ray;
         /**
-         * @en Convert a world position to a screen space (left-top origin) position.
-         * @zh 将一个世界空间坐标转换为屏幕空间(左上角为原点)坐标。
+         * @en Convert a world position to a screen space (left-bottom origin) position.
+         * @zh 将一个世界空间坐标转换为屏幕空间(左下角为原点)坐标。
          * @param worldPos The position in world space coordinates
          * @param out The output position in screen space coordinates.
          * @returns Return the output position object.
          */
         worldToScreen(worldPos: math.Vec3 | Readonly<math.Vec3>, out?: math.Vec3): math.Vec3;
         /**
-         * @en Convert a screen space (left-top origin) position to a world space position.
-         * @zh 将一个屏幕空间(左上角为原点)转换为世界空间坐标。
+         * @en Convert a screen space (left-bottom origin) position to a world space position.
+         * @zh 将一个屏幕空间(左下角为原点)转换为世界空间坐标。
          * @param screenPos The position in screen space coordinates
          * @param out The output position in world space coordinates
          * @returns Return the output position object.
          */

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