zoukankan      html  css  js  c++  java
  • Collision Detection

    Collision Detection

      Collision Detection是Rigidbody中的一个属性。所以显然Collision Detection指定的类型只在Rigidbody之间才有用。

      

    1、Collision Detection用来干什么?

      Used to prevent fast moving objects from passing through other objects without detecting collisions.

      用于阻止快速移动的objects因没有检测到collision而导致穿透other objects的情况。

    2、Collision Detection类型有3种,分别有什么作用?

      1)Discrete

        Use Discreet collision detection against all other colliders in the scene. Other colliders will use Discreet collision detection when testing for collision against it. Used for normal collisions (This is the default value).

        若本物体使用Discrete,则其它物体与本物体碰撞时,会使用Discrete来检测碰撞。这是默认值。

      2)Continuous

        Use Discrete collision detection against dynamic colliders (with a rigidbody) and continuous collision detection against static MeshColliders (without a rigidbody). Rigidbodies set to Continuous Dynamic will use continuous collision detection when testing for collision against this rigidbody. Other rigidbodies will use Discreet Collision detection. Used for objects which the Continuous Dynamic detection needs to collide with. (This has a big impact on physics performance, leave it set to Discrete, if you don't have issues with collisions of fast objects)

      3)Continuous Dynamic

        Use continuous collision detection against objects set to Continuous and Continuous Dynamic Collision. It will also use continuous collision detection against static MeshColliders (without a rigidbody). For all other colliders it uses discreet collision detection. Used for fast moving objects.

    3、第2节的规则可以整理成下表:

      

    4、综上所述,Collision Detection的目的是用来设置碰撞类型,以避免发生子弹窗纸的问题。

    参考:.../Unity.app/Contents/Documentation/Documentation/Components/class-Rigidbody.html

      

  • 相关阅读:
    导出EXCEL 没有乱码,已确认可以使用, 转自csdn
    发送微信模板消息 已测试通过
    mysql 无法启动 innodb 报错 1067
    redis3.0集群搭建
    centos下编译openjdk1.8
    Redis无法远程访问
    记一次优化的的意外收获
    mysql的基础优化
    关于inputStream.read()返回值的问题
    rest风格的url接收
  • 原文地址:https://www.cnblogs.com/tekkaman/p/3763835.html
Copyright © 2011-2022 走看看