Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

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.