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 Target

Setting Camera Target

Scheduled Pinned Locked Moved 3D Blocks
1 Posts 1 Posters 1.0k 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
    • 3D Coordinates and Positions

     

    Description

    Every camera has a target point that it looks at. This point is invisible, but you can change it by providing the x/y/z positions of a new target point.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/d34819dd-9ec2-4150-9477-e5e2f12d757c.png" width="400" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">

     

    Demo

    In this program, we first add 3 boxes at x positions of -150, 0 and 150. then we add a new orbit camera. By default the camera would be looking at the origin point (x = 0).

    When we change the camera’s target point to be x of -150, it is shifted left to look at the green box on the left. Similarly, when the target x is 150, the camera looks at the pink box on the right.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/fdff41e4-6493-4edc-992a-5a57bbed1726.gif" width="900" style="border-radius: 5px; border: 1px solid #29622d;">

    Try it yourself:

    https://play.creaticode.com/projects/4b0759677c498e7a48f581c5

     

    Learn More

    • Reading Camera Properties
    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