World To Screen: Difference between revisions

From Fancade Wiki
(Added link to Screen size)
Tags: Reverted Mobile edit Mobile web edit
Line 15: Line 15:


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.
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.
{{Block
|image=Current Frame.png
|type=s
|folder=Values
|output1={{Port|n|Current Frame}}
}}


== Related ==
== Related ==

Revision as of 20:15, 14 January 2026

World To Screen
World To Screen.png
TypeScript block
ColliderNone
FolderMath
Ports
Inputs World Pos
Outputs Screen X
Screen Y

Given a world coordinate, outputs its screen coordinates.

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
Current Frame.png
TypeScript block
ColliderNone
FolderValues
Ports
Outputs Current Frame

Related