Version: 2020.3
Language : English
Effectors 2D
Buoyancy Effector 2D

Area Effector 2D

Switch to Scripting

The Area Effector 2D applies forces within an area defined by the attached ColliderAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info
See in Glossary
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 RigidbodyA component that allows a GameObject to be affected by simulated gravity and other forces. More info
See in Glossary
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

Properties

Property: Function:
Use Collider Mask Check to enable use of the Collider Mask property? If this is not enabled, the Global CollisionA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info
See in Glossary
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 engineA system that simulates aspects of physical systems so that objects can accelerate correctly and be affected by collisions, gravity and other forces. More info
See in Glossary
.
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 GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
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 massRepresents the average position of all mass in a Rigidbody for the purposes of physics calculations. By default it is computed from all colliders belonging to the Rigidbody, but can be modified via script. More info
See in Glossary
.
        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