Version: 2017.3
Effectors 2D
Buoyancy Effector 2D

Area Effector 2D

The Area Effector 2D applies forces within an area defined by the attached Collider 2Ds when another (target) Collider 2D comes into contact with the Effector 2D. You can configure the force at any angle with a specific magnitude and random variation on that magnitude. You can also apply both linear and angular drag forces to slow down Rigidbody 2Ds.

Collider 2Ds that you use with the Area Effector 2D would typically be set as triggers, so that other Collider 2Ds can overlap with it to have forces applied. Non-triggers will still work, but forces will only be applied when Collider 2Ds come into contact with them.

The Area Effector 2D Inspector
The Area Effector 2D Inspector

Свойства

Свойство: Функция:
Use Collider Mask Check to enable use of the Collider Mask property? If this is not enabled, the Global Collision Matrix will be used as the default for all Collider 2Ds.
Collider Mask The mask used to select specific Layers allowed to interact with the Area Effector 2D.
Use Global Angle Check this to define the Force Angle as a global (world-space) angle. If this is not checked, the Force Angle is considered a local angle by the physics engine.
Force Angle The angle of the force to be applied.
Force Magnitude The magnitude of the force to be applied.
Force Variation The variation of the magnitude of the force to be applied.
Drag The linear drag to apply to Rigidbody 2Ds.
Angular Drag The angular drag to apply to Rigidbody 2Ds.
Force Target The point on a target GameObject where the Area Effector 2D applies any force.
        Collider The target point is defined as the current position of the Collider 2D. Applying force here can generate torque (rotation) if the Collider 2D isn’t positioned at the center of mass.
        Rigidbody The target point is defined as the current center-of-mass of the Rigidbody 2D. Applying force here will never generate torque (rotation).
Effectors 2D
Buoyancy Effector 2D
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961