Version: 2022.3
언어: 한국어
물리
플레이어

물리 2D

Go to Edit > Project Settings… > Physics 2D to manage the global settings for Physics 2D.

Note: To manage the global settings for 3D physics, refer to the Physics Project settings documentation instead.

물리 2D 인스펙터 설정
물리 2D 인스펙터 설정

The Physics 2D settings define limits on the accuracy of the physics simulation. A more accurate simulation requires more processing overhead, and these settings allow you to adjust the trade off between accuracy and performance that best suits your project. Refer to the general Physics documentation for further information.

General Settings tab

The following are the properties available in the General Settings tab of the Physics 2D manager window.

프로퍼티 기능
Gravity 모든 리지드바디 2D 게임 오브젝트에 적용되는 중력의 양을 설정합니다. 일반적으로 중력은 Y축의 음의 방향으로만 설정됩니다.
Default Material 개별 콜라이더 2D에 레퍼런스가 할당되지 않은 경우, 물리 머티리얼 2D에 대한 레퍼런스를 설정합니다.
Velocity Iterations 물리 엔진이 속도 효과를 결정하기 위해 수행하는 연산 반복 횟수를 설정합니다. 숫자가 클수록 물리 계산이 정확해지지만 CPU 시간이 증가합니다.
Position Iterations 물리 엔진이 포지션 변화를 결정하기 위해 수행하는 연산 반복 횟수를 설정합니다. 숫자가 클수록 물리 계산이 정확해지지만 CPU 시간이 증가합니다.
Velocity Threshold 탄성 충돌의 임계값을 설정합니다. 이 값보다 상대 속도가 낮은 충돌은 비탄성 충돌로 간주됩니다. 즉, 충돌하는 게임 오브젝트가 서로 튕겨나가지 않습니다.
Max Linear Correction 제약 해결 시 사용되는 최대 리니어 포지션 보정 값을 설정합니다(범위: 0.0001–1000000). 오버슈트를 방지하는 데 유용합니다.
Max Angular Correction 제약 해결 시 사용되는 최대 각도 보정 값을 설정합니다(범위: 0.0001–1000000). 오버슈트를 방지하는 데 유용합니다.
Max Translation Speed 리지드바디 2D 게임 오브젝트의 물리 업데이트 도중의 최고 리니어 속도를 설정합니다.
Max Rotation Speed 리지드바디 2D 게임 오브젝트의 물리 업데이트 도중의 최고 회전 속도를 설정합니다.
Baumgarte Scale Unity가 충돌 중복을 해결하는 속도를 결정하는 스케일 요소를 설정합니다.
Baumgarte Time of Impact Scale Unity가 충돌 시점 중복을 해결하는 속도를 결정하는 스케일 요소를 설정합니다.
Time to Sleep Set the time (in seconds) that must pass after a Rigidbody 2D stops moving before it goes to sleep.
Linear Sleep Tolerance Set the linear speed below which a Rigidbody 2D goes to sleep after the Time to Sleep elapses.
Angular Sleep Tolerance Set the rotational speed below which a Rigidbody 2D goes to sleep after Time to Sleep elapses.
Default Contact Offset Set a proximity distance value for Colliders to be considered in contact, even though they are not actually in contact. Colliders whose distance is less than the sum of their contactOffset values generate contacts. This allows the collision detection system to predictively enforce the contact constraint even when the objects are slightly separated. Caution: Reducing this value too far could cripple Unity’s ability to calculate continuous polygon collisions. Conversely, increasing the value too much could create artifacts for vertex collisions.
Simulation Mode Select when Unity executes the 2D physics simulation from the dropdown menu.
Fixed Update Select this to have Unity execute the physics simulation immediately after the MonoBehaviour.FixedUpdate is called.
Update Select this to have Unity execute the physics simulation immediately after the MonoBehaviour.Update is called.
스크립트 Select this to manually execute the physics simulation via Physics2D.Simulate.
Queries Hit Triggers Enable this option if you want Collider 2Ds marked as Triggers to return a hit when any physics query (such as Linecasts or Raycasts) intersects with them. Defaults to enabled.
Queries Start In Colliders Enable this option if you want physics queries that start inside a Collider 2D to detect the Collider they start in.
Callbacks On Disable Enable this option to produce collision callbacks when a Collider with contacts is disabled.
Reuse Collision Callbacks 이 설정을 활성화하면 물리 엔진이 모든 충돌 콜백에 대해 단일 Collision2D 인스턴스를 재사용합니다. 비활성화하면 물리 엔진이 각 충돌 콜백에 대해 새로운 Collision2D 인스턴스를 생성합니다.
Auto Sync Transforms 트랜스폼 변화를 물리 시스템과 자동으로 동기화하려면 이 옵션을 활성화합니다.
Gizmos Select the types of physics 2D gizmos to be drawn within the Editor. You may select multiple options.
Nothing Select this to deselect every option. No physics 2D gizmo will be drawn.
Everything Select this to select every option.
All Colliders Select this to have all Colliders drawn without having to select them in the Hierarchy window.
Colliders Outlined Select this to have Colliders drawn with an outline (you can customize the outline’s color in 2D Physics Preferences).
Colliders Filled Select this to have all Colliders drawn using the Fill color specified in the 2D Physics Preferences.
Colliders Sleeping Select this to have Colliders drawn to show when the Rigidbody 2D they are attached to is sleeping using the Awake or Asleep colors specified in the 2D Physics Preferences.
Collider Contacts Select this to have Collider contacts shown as a directional arrow that starts at the contact point in the direction of the contact normal. You can specify the Contact color of the arrow in the 2D Physics Preferences.
Collider Bounds Select this to have Collider bounds drawn for all PhysicsShape2D that a Collider creates. The bounds are an Axis-Aligned Bounding Box (AABB).
Multithreading Expand this to adjust the multithreading settings. Refer to Multithreading for information about each property.

Multithreading

The settings in the Multithreading section allow you to use the C# Job System to configure multithreaded physics.

Multithreading settings expanded.
Multithreading settings expanded.
프로퍼티 기능
Use Multithreading 잡 시스템을 사용하여 시뮬레이션 단계를 실행하려면 이 옵션을 활성화합니다. 실행 방법은 나머지 옵션을 사용하여 설정합니다.
Use Consistency Sorting 일관된 처리 순서의 유지가 시뮬레이션에 중요한 경우 이 옵션을 활성화합니다.
여러 개의 CPU 스레드에서 시뮬레이션을 실시하면 별도의 데이터 배치가 생성됩니다. 이러한 별도의 배치를 처리하면 처리 순서의 결정론적 분명성이 감소하는 대신 결과가 더 빠르게 도출됩니다.
Interpolation Poses Per Job 각 시뮬레이션 작업에서 보간되는 최소 리지드바디 2D 오브젝트 수를 설정합니다.
New Contacts Per Job 각 시뮬레이션 작업에서 찾을 최소한의 새로운 접촉 수를 설정합니다.
Collide Contacts Per Job 각 시뮬레이션 작업에서 충돌할 최소 접촉 수를 설정합니다.
Clear Flags Per Job 각 시뮬레이션 작업에서 지울 최소 플래그 수를 설정합니다.
Clear Body Forces Per Job 각 시뮬레이션 작업에서 지울 최소 바디 수를 설정합니다.
Sync Discrete Fixtures Per Job 각 시뮬레이션 작업에서 이산적 아일랜드 솔빙 중 BroadPhase에서 동기화할 최소 고정물 수를 설정합니다.
Sync Continuous Fixtures Per Job 각 시뮬레이션 작업에서 연속적 아일랜드 솔빙 중 BroadPhase에서 동기화할 최소 고정물 수를 설정합니다.
Find Nearest Contacts Per Job 각 시뮬레이션 작업에서 찾을 최소한의 가장 가까운 접촉 수를 설정합니다.
Update Trigger Contacts Per Job 각 시뮬레이션 작업에서 업데이트할 최소한의 트리거 접촉 수를 설정합니다.
Island Solver Cost Threshold 이산적 아일랜드 솔빙 중 모든 바디, 접점과 조인트의 최소 임계값 비용을 설정합니다.
Island Solver Body Cost Scale 이산적 아일랜드 솔빙 중 각 바디의 비용 스케일을 설정합니다.
Island Solver Contact Cost Scale 이산적 아일랜드 솔빙 중 각 접점의 비용 스케일을 설정합니다.
Island Solver Joint Cost Scale 이산적 아일랜드 솔빙 중 각 조인트의 비용 스케일을 설정합니다.
Island Solver Bodies Per Job 아일랜드 솔빙을 수행할 때 각 시뮬레이션 작업에서 처리할 최소 바디 수를 설정합니다.
Island Solver Contacts Per Job 아일랜드 솔빙을 수행할 때 각 시뮬레이션 작업에서 처리할 최소 접점 수를 설정합니다.

Layer Collision Matrix tab

The Layer Collision Matrix tab settings control whether Colliders (attached to different Rigidbody 2Ds) can come into contact which each other, based on the Layer assigned to the GameObject they are on. The matrix displays each Layer against every other Layer, allowing you to select which specific Layers can come into contact with another.

The Layer Collision Matrix tab.
The Layer Collision Matrix tab.

A check mark at the intersection between two Layers indicates that contact is allowed between those two Layers, while a cleared checkbox indicates that contact between those two Layers is never allowed. When you hover over a Layer’s name or a checkbox, its row and column are highlighted to make it easier to see which Layers its affects.

Tip: To optimize for the best possible performance, you should ensure that only the minimum number of potential contacts are selected by only selecting the specific Layers that you want to have contact with others, and disabling all other unnecessary contacts. To help with this, you can select Disable All or Enable All to quickly select or deselect all options at once. and then select the specific Layers.

추가 리소스

Physics2DManager

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