Version: 2023.1

Physics2D.useSubStepContacts

切换到手册
public static bool useSubStepContacts ;

描述

Whether to calculate contacts for all simulation sub-steps or only the first sub-step.

When simulation sub-stepping is enabled with Physics2D.useSubStepping, this property is used to control the whether or not contacts are calculated for all sub-steps or only the first sub-step.

When enabled, contacts are calculated for all sub-steps. This provides a more accurate simulation for each sub-step but will reduce performance. In most cases, this extra contact calculation isn't required.

When disabled, contacts are only calculated for the first sub-step. Subsequent sub-steps only perform integration and constraint solving. This increases performance whilst still maintaining a stable simulation. In most cases, this should be used.

See Also: Physics2D.useSubStepping, Physics2D.minSubStepFPS, Physics2D.maxSubStepCount, PhysicsScene2D.subStepCount and PhysicsScene2D.subStepLostTime.

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