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. 知识库
  3. 三维积木
  4. 添加尾迹

添加尾迹

Scheduled Pinned Locked Moved 三维积木
1 Posts 1 Posters 896 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.
  • C Offline
    C Offline
    CreatiCode TA 2
    wrote on last edited by admin
    #1

     

    预备知识

    • 添加盒子
    • 名称和角色物体

     

    介绍

    有的时候,我们会有一些移动得很快的物体,比如一个球或一颗子弹。我们可以在这些物体上添加尾迹来展示它们的移动途径。

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/3e9d585d-3dfc-4490-af26-cb8b7a3aabd5.gif" width="450" style="border-radius: 5px; border: 1px solid #29622d;">

    需要注意的是,尾迹在它的开端会比较厚,然后尾迹的宽度会慢慢减少,直到它在末端消失。

     

    ”添加尾迹“编程积木

    ”添加尾迹“编程积木会在现有角色的现有角色物体添加一个新的尾迹。让我们把这个物体称为”目标物体“。

     
    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/0ef4ad98-9448-4bb2-821e-aa1a8ddb8c9e.png" width="700" style="">

     

    反射色和自发色

    你可以在把这两个颜色设置到尾迹网格,就好像你怎么样更新一个盒子的颜色。需要注意的是,我们经常需要让尾迹散发一些光线,所以自发色会被用来设置光线的颜色。

     

    宽度

    这个数值控制尾迹在开端的宽度(最厚的一个点)。需要注意的是,尾迹会被画成和头部一样的宽度,不管是我们的摄像头是在哪个角度看着尾迹。

     

    段数

    这个数值间接地控制尾迹的长度。每个段数对应着目标物体的其中一个之前的位置。如果段数数值是50,那么尾迹就会被画在沿着所有过去50个段数的轨迹上。所以当目标物体移动得更快,段数之间的距离会更长。

     

    演示

    在这个演示中,一个球体会反复地左右移动,而一个尾迹会被添加来展示它的轨迹。

     
    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/7602f243-8a3d-4c22-b16d-41f49d7792bd.gif" width="450" style="border-radius: 5px; border: 1px solid #29622d;">
     

    在这个程序中,有两个需要注意的地方:

    1. 要让尾迹散发颜色,我们需要把尾迹本身添加到发光层,而不是添加目标物体的尾迹。
    2. 在添加尾迹之后,它变成了目标物体。所以如果要让原本的名为s的目标物体左右移动,我们需要先选择原本的物体。

     
    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/198601e1-e555-4b01-911f-74247aa204fa.png" width="450" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">
     

     
    动手时刻:

    https://play.creaticode.com/projects/63e4e69aef66187247332746

    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