You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Physics Library > setForce

19.4.21 setForce

self = physics.Body:setForce(vector)


Parameter

Type

Description

self

in physics.Body

The input Body

vector

in physics.Vect

The vector of force on the Body

self

out physics.Body

The input Body is returned as the output

Updates the force vector on the body.

Returns the Body.

Introduced in platform.apiLevel = '2.0'