PhysicsBody.BatchImpulse
A batch item used to apply an impulse to a PhysicsBody.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Struct
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
- Implements: IEquatable<BatchImpulse>
public struct PhysicsBody.BatchImpulse : IEquatable<PhysicsBody.BatchImpulse>
Constructors
Constructor | Description |
|---|---|
| BatchImpulse(Unity.U2D.Physics.PhysicsBody) | Create a default batch impulse, assigning the PhysicsBody. |
Properties
Property | Description |
|---|---|
| physicsBody | The PhysicsBody to write to. |
Methods
Method | Description |
|---|---|
| ApplyAngularImpulse | Apply an angular impulse. This should be used for one-shot impulses. If you need a steady torque, use a torque instead, which will work better with the sub-stepping solver. PhysicsBody.ApplyAngularImpulse. |
| ApplyLinearImpulse | Apply an impulse at a point. This immediately modifies the velocity and also modifies the angular velocity if the point of application is not at the center of mass. This should be used for one-shot impulses. If you need a steady force, use a force instead, which will work better with the sub-stepping solver. PhysicsBody.ApplyLinearImpulse. |
| ApplyLinearImpulseToCenter | Apply an impulse to the center of mass. This immediately modifies the velocity. This should be used for one-shot impulses. If you need a steady force, use a force instead, which will work better with the sub-stepping solver. PhysicsBody.ApplyLinearImpulseToCenter. |