Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsBody.BatchImpulse

A batch item used to apply an impulse to a PhysicsBody.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Struct
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public struct PhysicsBody.BatchImpulse

Constructors

Constructor

Description

BatchImpulse(Unity.U2D.Physics.PhysicsBody)Create a default batch impulse, assigning the PhysicsBody.

Properties

Property

Description

physicsBodyThe PhysicsBody to write to.

Methods

Method

Description

ApplyAngularImpulseApply 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.
ApplyLinearImpulseApply 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.
ApplyLinearImpulseToCenterApply 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.