Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Knowledge Base
  3. 3D Blocks
  4. Reading Camera Properties

Reading Camera Properties

Scheduled Pinned Locked Moved 3D Blocks
1 Posts 1 Posters 908 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CreatiCodeI Offline
    CreatiCodeI Offline
    CreatiCode
    wrote on last edited by admin
    #1

     

    Prerequisite

    • Setting Camera Target
    • Setting Camera Properties

     

    Description

    You can read some information about the currently active camera using this block.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/f1d5d203-b114-41ae-8d14-c7fda826204e.png" width="260" style="">

     

    • Distance: how far is the camera from the target point
    • V-Angle: the vertical view angle of the camera, between 0 degrees and 180 degrees.
    • H-Angle: the horizontal view angle of the camera.
    • Target X: the x position of the target point of the camera.
    • Target Y: the x position of the target point of the camera.
    • Target Z: the x position of the target point of the camera.
    • X Position: the x position of the camera.
    • Y Position: the y position of the camera.
    • Z Position: the z position of the camera.

     

    Demo

    As we rotate, zoom or shift the camera, we can see the reported property values change accordingly.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/c2fa6315-41d6-4f08-9cb0-04ee994ca28b.gif" width="900" style="border-radius: 5px; border: 1px solid #29622d;">

     
     

    Moving the Camera or the Target?

    Note that there are 2 types of operations on the camera:

    Moving the Target Point:

    When you use the right mouse key to shift the target point, or with the “A”, “D”, “Q”, “E” keys on the keyboard, you are moving the target point itself, and the camera will stay at the same relative position to the target.

    In the example below, we shift the target point, so the distance and angle of the camera stay the same, but the “target x” is changed:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/9b631161-3cf0-4868-b9b5-150747e46e6f.gif" width="1000" style="border-radius: 5px; border: 1px solid #29622d;">

    Moving the Camera Relative to the Target:

    When you use the left mouse key to rotate the camera, or the middle scroll button of the mouse to zoom in/out, or use the “W” and “S” keys to zoom in/out, you are keeping the target point the same, but moving the camera relative to that target point.

    In the example below, we rotate and zoom the camera, so the distance and angle of the camera are both changed, but the “target x” stays the same:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/7bd61dc6-7e71-48ed-bf75-bda6dc549772.gif" width="1000" style="border-radius: 5px; border: 1px solid #29622d;">

    1 Reply Last reply
    0
    • CreatiCodeI CreatiCode pinned this topic on

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode