Login

Fancade Wiki

Updated How do I get the camera's position, rotation, and distance?.md (markdown)

... ...
@@ -1,3 +1,3 @@
1
Unfortunately, there is no built-in "Get Camera" block. The easiest way to get around that is to save the camera's parameters in [[global variables|Script/How do I make a variable global?]] while (or instead of) setting them.
1
Unfortunately, there is no built-in "Get Camera" block. The easiest way to get around that is to save the camera's parameters in [[global variables|/Script/How do I make a variable global?]] while (or instead of) setting them.
2 2
3
If that's not an option for you (for example, if you're making a custom block for *everyone* to use), it *is* possible to calculate the camera's parameters with [[Blocks/Screen to World]] and some clever math. However, this will lag behind the real camera by one frame, as Screen to World uses the current frame's camera, while Set Camera affects the next frame. If that's not a problem for you, [[here's|https://play.fancade.com/5C67367D142708D2]] an example by Mathias Elgaard. (Or try to figure it out yourself, it's fun!)
... ...
\ No newline at end of file
0
If that's not an option for you (for example, if you're making a custom block for *everyone* to use), it *is* possible to calculate the camera's parameters with [[/Blocks/Screen to World]] and some clever math. However, this will lag behind the real camera by one frame, as Screen to World uses the current frame's camera, while Set Camera affects the next frame. If that's not a problem for you, [[here's|https://play.fancade.com/5C67367D142708D2]] an example by Mathias Elgaard. (Or try to figure it out yourself, it's fun!)
... ...
\ No newline at end of file
Fancade Wiki