World To Screen: Difference between revisions
(Added content) Tags: Reverted Mobile edit Mobile web edit |
(Fixed erro) Tags: Reverted Mobile edit Mobile web edit |
||
| Line 10: | Line 10: | ||
Given a world coordinate, outputs its screen coordinates. | Given a world coordinate, outputs its screen coordinates. | ||
For example, if a block is in 0,0,0, depending of the screen position, | For example, if a block is in 0,0,0, depending of the screen position, the World to Screen will transform the block coordinates into the position that the block is viewed in the screen, like it was a 2D block. | ||
== Notes == | == Notes == | ||
Revision as of 20:29, 14 January 2026
World To Screen
| Type | Script block |
| Collider | None |
| Folder | Math |
| Ports | |
|---|---|
| Inputs | World Pos |
| Outputs | Screen X Screen Y |
Given a world coordinate, outputs its screen coordinates.
For example, if a block is in 0,0,0, depending of the screen position, the World to Screen will transform the block coordinates into the position that the block is viewed in the screen, like it was a 2D block.
Notes
Due to a technical issue, still to be fixed, the output lags by one frame. I.e. if you Set Camera on frame N, then this block's output will change on frame N+1.
Because of this bug, the script will not function correctly on the first frame. To avoid incorrect values, use the block's output if the Current Frame is greater than 0.
World To Screen
| Type | Script block |
| Collider | None |
| Folder | Values |
| Ports | |
|---|---|
| Outputs | Current Frame |