Version: 2017.2
public void AddTorque (float torque, ForceMode2D mode= ForceMode2D.Force);

파라미터

torque Torque to apply.
mode The force mode to use.

설명

Apply a torque at the rigidbody's centre of mass.

A torque is conceptually a force being applied at the end of an imaginary lever, with the fulcrum at the centre of mass. A torque of five units could thus be equivalent to a force of five units pushing on the end of a lever one unit long, or a force of one unit on a lever five units long. Unity's units are arbitrary but the principle that torque = force x lever length still applies.

Note that unlike a 3D Rigidbody, a Rigidbody2D can only rotate in one axis and so torque is a float value rather than a vector.

See Also: AddForce, AddForceAtPosition, Rigidbody.AddTorque.

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