文档

Unity Engine

Unity Engine

PhysicsBody.BatchForce

A batch item used to apply a force to a PhysicsBody.
阅读时间1 分钟最后更新于 1 个月前

Definition

public struct PhysicsBody.BatchForce

Constructors

Constructor

Description

BatchForce(UnityEngine.LowLevelPhysics2D.PhysicsBody)Create a default batch force, assigning the PhysicsBody.

Properties

Property

Description

physicsBodyThe PhysicsBody to write to.

Methods

Method

Description

ApplyForceApply a force at a world point. If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity. PhysicsBody.ApplyForce.
ApplyForceToCenterApply a force to the center of mass. PhysicsBody.ApplyForceToCenter.
ApplyTorqueApply a torque. This affects the angular velocity without affecting the linear velocity. PhysicsBody.ApplyTorque.