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. The Follow Camera

The Follow Camera

Scheduled Pinned Locked Moved 3D Blocks
1 Posts 1 Posters 1.8k 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
    • 3D Directions and Rotations

     

    Introduction

    When we are using an obit camera, if a car or an avatar is moving around, it can easily run out of our camera view. In such cases, we need to use a “follow camera” (also called a "tracking camera’), which follows the target object as it moves.

    Usually, you should use this block immediately after the block that adds the target object to the scene, such as “add avatar”, “add model” or “add box”, etc.

     

    The “Add Follow Camera” Block

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/9701e4ac-0d5a-4969-94b9-c03f5ed7c712.png" width="900" style="">

     

    Parameters

     

    Distance

    This is the distance between the camera and the target object’s position.

    ccimg||1000||,

     

    Z-Offset

    This input raises the camera’s target point. As shown above, when the target is an avatar, our camera would be looking at the feet of the avatar by default. If we want to put the avatar body at the center of our camera’s view, we can use the “z offset” to make the camera look at a higher point.

    ccimg||1000||,

     

    V-Angle and H-Angle

    These 2 inputs are the vertical and horizontal view angles of the camera, similar to orbit cameras.

    ccimg||900||,

     

    Direction Lock

    The direction lock is the most important input for the follow camera. It controls how the camera moves relative to the target.

    • Direction Lock = Fixed: This means that the camera’s view angles and distances will remain fixed, no matter which way the target object is facing or moving to. When H-Angle is 0, the camera will look forward in the direction of the Y-Axis. When H-Angle is 180, the camera will face the opposite direction. Also, you can not use the mouse to rotate or zoom the camera.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/e25ca059-1180-41da-8b13-b8c5efd67f31.gif" width="1000" style="margin-left: 40px; border-radius: 5px; border: 1px solid #29622d;">

     

    • Direction Lock = Target: This means that the camera will always point in the same direction as the target object. For example, if the target object turns right, then the camera would rotate as well to stay behind the target. The H-Angle input will be ignored in this case, and you can not control the camera using the mouse.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/a42fe49d-02ea-49ee-b597-b825cbb8cff6.gif" width="1000" style="margin-left: 40px; border-radius: 5px; border: 1px solid #29622d;">

     

    • Direction Lock = Free: This mode simply means you can control the camera at any time, even when the target is moving. Note that you can rotate the camera with the left mouse button, you can not shift the target with the right button anymore, because the target point is locked on the target object this camera is following.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/43a86060-8bfe-4f4b-9024-579598fbede6.gif" width="1000" style="margin-left: 40px; border-radius: 5px; border: 1px solid #29622d;">

     

    • Direction Lock = Free (Right Button): This mode is the same as the “Free” mode, except that you need to use the right mouse button to rotate the camera.

     

    See-Through %

    When the target is blocked by another object, we can make that object transparent. This input controls the transparency of the blocking object. For example, 0% means the blocking object will fully block the view, and 100% means the blocking object will be fully transparent.

    ccimg||900||,

    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