Version: 2020.1
언어: 한국어
public bool useOneWayGrouping ;

설명

Ensures that all contacts controlled by the one-way behaviour act the same.

When using the oneWay behaviour, each individual collider that comes into contact with the PlatformEffector2D is checked to see if it should be disabled or not by comparing its collision normal to the surfaceArc. Working on each individual collider like this can cause problems on objects that are comprised of multiple colliders.

If an object is comprised of many colliders and one of them has a contact disabled due to the one-way behaviour then it may be preferable to do the same for all colliders on the same object should they come into contact with the same PlatformEffector2D. To do this, set the useOneWayGrouping to true. When you do this, all colliders essentially act as one, all following each other with regards to the one-way behaviour.

When the useOneWayGrouping is not enabled, an object comprised of multiple colliders could end up in a situation where it has one collider contact disabled by passing through the one-way platform, but have others not able to pass through.

See Also: useOneWay.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961