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 792 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/723e8c87-6e10-4145-8c2e-d444af9fac30.png" width="900" style="">
     

    碰撞器大小 X/Y/Z

    默认情况下,碰撞器会被设置成精准覆盖玩家物体的大小。虽然如此,你可以根据你的需求来改变它的大小。

    举个例子,如果你要碰撞器盒子变得特别厚,你可以设置“Y"的大小。

     
    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/f4361cdd-3851-45bb-9bc2-40207436f64e.gif" width="800" style="border-radius: 5px; border: 1px solid #29622d;">
     

    碰撞器 Z 位移

    你也可以为碰撞器盒子设置一个不一样的Z位移。举个例子,如果你的角色正在运行一个游泳动画,那你需要设置碰撞器盒子的维度和Z位移。

     
    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/0eed6bdc-7d58-4ee1-84a6-b06e9493459a.gif" width="800" style="border-radius: 5px; border: 1px solid #29622d;">
     

     

    检测距离 X/Y/Z

    这三个输入框允许你设置射线在三个方向的长度。举个例子,如果你的角色绝对不会朝侧边移动,那你可以把X方向的碰撞器设置成0,X方向的碰撞将不会被检测,这可以减少一些计算时间。

     
    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/088da114-ea39-4e26-8837-6c1ac2790b2d.gif" width="700" style="border-radius: 5px; border: 1px solid #29622d;">
     

    碰撞器盒子颜色

    最后,如果黄色没有提供明显的对比,你可以把碰撞器盒子设置成不同颜色。

     
    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/9cbab968-f007-433f-9901-7c4628f7c546.gif" width="700" style="border-radius: 5px; border: 1px solid #29622d;">
     

    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