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. Setting Camera Limits

Setting Camera Limits

Scheduled Pinned Locked Moved 3D Blocks
1 Posts 1 Posters 956 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

    • Using an Orbit Camera for 3D Scene Navigation

     
     

    Description

    You can set limits to an orbit camera using this block:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/5b846480-64c8-41e6-8e97-3da02ce1cf32.png" width="1200" style="">

     

    Parameters

     

    • Radius Min/Max: These 2 numbers set the minimum and maximum distance between the camera and its target point. For example, if you set them to 300 and 400, then you can not zoom the camera towards the target point closer than 300 units, or further away than 400 units.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/4134397a-7796-4546-849b-ac240889344d.gif" width="1000" style="margin-left: 40px; border-radius: 5px; border: 1px solid #29622d;">

     

    • Visible Range Min/Max: These 2 numbers control the range of objects in the scene that are displayed in the camera. For example, if we set them to be 5 to 1000, then any object that is closer than 5 units to the camera or further away than 1000 units from the camera will not be shown in the camera.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/1c4b5ec2-570c-4bc2-962f-5b084436764d.gif" width="1000" style="margin-left: 40px; border-radius: 5px; border: 1px solid #29622d;">

     

    • V-angle Min/Max: These 2 numbers control the V-angle of the camera. By default it is between 0 and 180, which covers all angles. However, if you set it to a smaller range, such as between 45 and 90 degrees, then the camera can not tilt above or below this range:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/50162a1d-c014-4b7c-a3c2-88867f90c903.gif" width="860" style="margin-left: 40px; border-radius: 5px; border: 1px solid #29622d;">
     

    • Pan/Rotate Speed: The last 2 inputs control how fast you can manually shift or rotate the camera. The larger these numbers, the faster the camera will move. For example, here is the difference between a panning speed of 500 vs 5000:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/f654b95a-3fbc-44ef-b8ad-ff43d4bddc7b.gif" width="800" style="margin-left: 40px; border-radius: 5px; border: 1px solid #29622d;">

     
     

    Example

    One situation where we have to set the camera’s visible range is when we use a different sky. The “set sky” block would add a huge skybox to the scene, but a normal orbit camera would not see that far. Therefore, we need to enlarge the visible range of the camera after setting the sky:

    1c408045-9280-407c-9432-732583d8827c-image.png

     

    7a06396d-f20e-4ed9-bc43-28c1789e7035-image.png

    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