PhysicsBody.BatchForce
A batch item used to apply a force to a PhysicsBody.
Read time 1 minuteLast updated 9 days ago
Definition
- Type: Struct
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public struct PhysicsBody.BatchForce
Constructors
Constructor | Description |
|---|---|
| BatchForce(Unity.U2D.Physics.PhysicsBody) | Create a default batch force, assigning the PhysicsBody. |
Properties
Property | Description |
|---|---|
| physicsBody | The PhysicsBody to write to. |
Methods
Method | Description |
|---|---|
| ApplyForce | Apply 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. |
| ApplyForceToCenter | Apply a force to the center of mass. PhysicsBody.ApplyForceToCenter. |
| ApplyTorque | Apply a torque. This affects the angular velocity without affecting the linear velocity. PhysicsBody.ApplyTorque. |