Updated How do I get the camera's position, rotation, and distance?.md (markdown)
commited
commit
28c6c74164ae9a3f6ef31d146f872b8e4fa8f252
... | ... | @@ -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 |