Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    Setting Camera Target

    3D Blocks
    1
    1
    299
    Loading More Posts
    • 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.
    • info-creaticode
      CreatiCode last edited by admin

       

      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.

       

      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.

      Try it yourself:

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

       

      Learn More

      • Reading Camera Properties
      1 Reply Last reply Reply Quote 0
      • Pinned by  info-creaticode info-creaticode 
      • First post
        Last post