object:applyForce()

Type Function
Object ParticleSystem
Library physics.*
Return value none
Revision Release 2024.3703
Keywords applyForce, physics, LiquidFun
See also physics.newParticleSystem()
object:applyLinearImpulse()

Overview

A function that accepts x and y components of a linear force in newtons, applied to the center of each particle in a ParticleSystem.

Syntax

particleSystem:applyForce( xForce, yForce )
xForce, yForce (required)

Numbers. Amount of force to apply in the x and y directions respectively.

Example

particleSystem:applyForce( 0, -9.8 * particleSystem.particleMass )