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

19.4.27 setVel

self = physics.Body:setVel(vector)

Parameter

Type

Description

self

in physics.Body

The input Body

vector

in physics.Vect

The velocity vector of the Body

self

out physics.Body

The input Body is returned as the output

Updates the velocity of the body.

Returns the Body.

Introduced in platform.apiLevel = '2.0'